Creates a new BadUploadUrlError instance.
Parsed B2 error response body.
Optionaloptions: { requestId?: string }The error details including HTTP status, error code, message, and optional request ID.
ReadonlycodeB2 error code identifying the error type (e.g. expired_auth_token).
Optional ReadonlyrequestB2 request ID from the X-Bz-Request-Id response header, if present.
ReadonlyretryableWhether this error is transient and the request can be retried.
Optional ReadonlyretryRetry delay in seconds from the Retry-After response header, if present.
ReadonlystatusHTTP status code returned by the B2 API.
Thrown when an upload URL is no longer valid and must be refreshed.
Forward-compat insurance: B2 does not currently surface a distinct error code for this case, so classifyError never actually instantiates this class today. It's part of the public API so consumers can pre-write
instanceofchecks; when B2 documents abad_upload_url(or similar) error code, theclassifyErrorswitch gets a matching case and existing consumer code starts catching the typed error without any changes on their side.Until then, expect
BadRequestErrorfor upload-URL invalidation scenarios — that's what B2 currently returns.