Parse an error from a B2 API call and return a structured error object.
Handles the error shapes used in this codebase:
err.status
err.code
err.requestId
err.$metadata.httpStatusCode
err.name
err.Code
err.$metadata.requestId
TimeoutError
request_timeout
AbortError
request_aborted
.cause
operation_status_unknown
Reading the AWS SDK shape is what lets us tell a genuine Backblaze 5xx apart from a 4xx (e.g. NoSuchKey) and surface the requestId support needs.
Error value thrown by B2 native, S3-compatible, or local code.
The normalized B2 API error object.
Parse an error from a B2 API call and return a structured error object.
Handles the error shapes used in this codebase:
err.status+err.code+err.requestIderr.$metadata.httpStatusCode+err.name/err.Code, with the trace id inerr.$metadata.requestId.TimeoutErrormaps torequest_timeout/ HTTP 504.AbortErrormaps torequest_aborted/ HTTP 499..cause, includingoperation_status_unknown/ HTTP 409 from interrupted no-replay native B2 writes.Reading the AWS SDK shape is what lets us tell a genuine Backblaze 5xx apart from a 4xx (e.g. NoSuchKey) and surface the requestId support needs.