Crypto SDK
    Preparing search index...

    Interface ApiError

    Error response returned by the API on failure.

    try {
    await client.hash({ algorithm: 'invalid', data: 'x' });
    } catch (err) {
    const apiErr = (err as CryptoApiError).body satisfies ApiError;
    console.error(apiErr.error, apiErr.details);
    }
    interface ApiError {
        error: string;
        details?: { field: string; message: string }[];
    }
    Index
    error: string

    Human-readable error message.

    details?: { field: string; message: string }[]

    Optional per-field validation errors.

    Type Declaration

    • field: string

      Name of the invalid field.

    • message: string

      Validation failure description.