Skip to content

Commit be895ed

Browse files
committed
Add HTTP code 413 as permanent error
Code 413 is defined as "Payload Too Large" (The request is larger than the server is willing or able to process). https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#4xx_Client_Error This might be needed when the backend responds that it's either entirely out of space or the request exceeds the quota. Neither of the previous permanent errors (415, 500, 501) corresponded to this situation.
1 parent b9e5421 commit be895ed

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/flow.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
generateUniqueIdentifier: null,
9292
maxChunkRetries: 0,
9393
chunkRetryInterval: null,
94-
permanentErrors: [404, 415, 500, 501],
94+
permanentErrors: [404, 413, 415, 500, 501],
9595
successStatuses: [200, 201, 202],
9696
onDropStopPropagation: false,
9797
initFileFn: null,
@@ -1400,7 +1400,7 @@
14001400
return 'success';
14011401
} else if (this.flowObj.opts.permanentErrors.indexOf(this.xhr.status) > -1 ||
14021402
!isTest && this.retries >= this.flowObj.opts.maxChunkRetries) {
1403-
// HTTP 415/500/501, permanent error
1403+
// HTTP 413/415/500/501, permanent error
14041404
return 'error';
14051405
} else {
14061406
// this should never happen, but we'll reset and queue a retry

0 commit comments

Comments
 (0)