Skip to content

Commit f59f3e7

Browse files
Merge pull request #438 from ryanseys/check-retry-limit-404
Check retry limit on 404 errors
2 parents bc9a771 + af608d5 commit f59f3e7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/storage/file.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1119,7 +1119,8 @@ File.prototype.startResumableUpload_ = function(stream, metadata) {
11191119
// Handle an error from API calls following the recommended best practices:
11201120
// http://goo.gl/AajKku
11211121
function handleError(err) {
1122-
if (err.code === 404) {
1122+
if (err.code === 404 && retries < RETRY_LIMIT) {
1123+
retries++;
11231124
startUpload();
11241125
return;
11251126
}

0 commit comments

Comments
 (0)