@backblaze-labs/b2-sdk - v0.1.0
    Preparing search index...

    Class ChecksumMismatchError

    Thrown when the uploaded file's SHA-1 checksum does not match the expected value.

    Forward-compat insurance: the B2 API currently rejects mismatched uploads with a generic bad_request code, so classifyError never actually instantiates this class today. It's part of the public API so consumers can pre-write instanceof checks; when B2 documents a dedicated checksum-mismatch code, the classifyError switch gets a matching case and existing consumer code starts catching the typed error without any changes on their side.

    Until then, expect BadRequestError for SHA-1 mismatch scenarios.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    B2 error code identifying the error type (e.g. expired_auth_token).

    requestId?: string

    B2 request ID from the X-Bz-Request-Id response header, if present.

    retryable: boolean

    Whether this error is transient and the request can be retried.

    retryAfter?: number

    Retry delay in seconds from the Retry-After response header, if present.

    status: number

    HTTP status code returned by the B2 API.