Error thrown when the Crypto API returns a non-OK HTTP response.
try { await client.hash({ algorithm: 'invalid', data: 'x' });} catch (err) { if (err instanceof CryptoApiError) { console.error(err.status, err.body.error); }} Copy
try { await client.hash({ algorithm: 'invalid', data: 'x' });} catch (err) { if (err instanceof CryptoApiError) { console.error(err.status, err.body.error); }}
Readonly
HTTP status code returned by the API.
Parsed error response body.
Error thrown when the Crypto API returns a non-OK HTTP response.
Example