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

    Class B2Error

    Base error class for all B2 API errors. Contains the HTTP status, B2 error code, and retry metadata from the response.

    Hierarchy (View Summary)

    Index

    Constructors

    • Creates a new B2Error instance.

      Parameters

      • response: B2ErrorResponse

        Parsed B2 error response body.

      • Optionaloptions: { requestId?: string; retryAfter?: number }

        Optional retry and request metadata from response headers.

      Returns B2Error

    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.