Error thrown when the Crypto API returns a non-OK HTTP response. Its body is the RFC 9457 problem the server sent.
body
try { await client.sign({ keyId: 'k_unknown0000000000000000', message: 'x' });} catch (err) { if (err instanceof CryptoApiError) { console.error(err.status, err.body.type, err.body.detail); }} Copy
try { await client.sign({ keyId: 'k_unknown0000000000000000', message: 'x' });} catch (err) { if (err instanceof CryptoApiError) { console.error(err.status, err.body.type, err.body.detail); }}
Readonly
HTTP status code returned by the API.
Parsed problem details body.
Error thrown when the Crypto API returns a non-OK HTTP response. Its
bodyis the RFC 9457 problem the server sent.Example