Occasionally when uploading files, even after an upload URL has been retrieved, B2 can respond with the following when attempting to upload:
{
"code": "service_unavailable",
"message": "c001_v0001113_t0035 is too busy",
"status": 503
}
This is by design, and should trigger this library to attempt to get a new upload URL and retry.
We handle this more gracefully (-ish) in uploadFileSmall, but do not handle it at all in uploadFileLarge. For uploadFileSmall, we should be requesting a new upload URL on a retry, rather than just uploading again to the "too busy" URL. For uploadFileLarge, this check would would probably make sense around line 1402 of index.js, replacing the upload URL we just used and got an error from, with a new one.
Occasionally when uploading files, even after an upload URL has been retrieved, B2 can respond with the following when attempting to upload:
This is by design, and should trigger this library to attempt to get a new upload URL and retry.
We handle this more gracefully (-ish) in
uploadFileSmall
, but do not handle it at all inuploadFileLarge
. ForuploadFileSmall
, we should be requesting a new upload URL on a retry, rather than just uploading again to the "too busy" URL. ForuploadFileLarge
, this check would would probably make sense around line 1402 ofindex.js
, replacing the upload URL we just used and got an error from, with a new one.Testing should be done as per https://www.backblaze.com/b2/docs/integration_checklist.html. A header can be set to simulate artificial errors.