Crypto SDK
    Preparing search index...

    Interface ApiError

    Error body returned by the API on failure: an RFC 9457 problem (application/problem+json).

    try {
    await client.sign({ keyId: 'k_unknown0000000000000000', message: 'x' });
    } catch (err) {
    const problem = (err as CryptoApiError).body satisfies ApiError;
    console.error(problem.type, problem.detail, problem.code);
    }
    interface ApiError {
        type: string;
        title: string;
        status: number;
        detail: string;
        instance?: string;
        code?: string;
        errors?: ApiErrorField[];
        [extension: string]: unknown;
    }

    Indexable

    • [extension: string]: unknown

      Other extension members (e.g. limit, resetSeconds).

    Index
    type: string

    Problem type, urn:crypto-service:problem:<slug> (or about:blank).

    title: string

    Short summary of the problem type.

    status: number

    HTTP status code.

    detail: string

    Explanation of this occurrence.

    instance?: string

    Request path of this occurrence.

    code?: string

    Machine-readable code for crypto-lib and key-store errors (e.g. "KEY_NOT_FOUND").

    errors?: ApiErrorField[]

    Per-field failures of a validation-failed problem.