Skip to content

Commit

Permalink
Merge pull request #438 from ryanseys/check-retry-limit-404
Browse files Browse the repository at this point in the history
Check retry limit on 404 errors
  • Loading branch information
stephenplusplus committed Mar 11, 2015
2 parents bc9a771 + af608d5 commit f59f3e7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/storage/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,8 @@ File.prototype.startResumableUpload_ = function(stream, metadata) {
// Handle an error from API calls following the recommended best practices:
// http://goo.gl/AajKku
function handleError(err) {
if (err.code === 404) {
if (err.code === 404 && retries < RETRY_LIMIT) {
retries++;
startUpload();
return;
}
Expand Down

0 comments on commit f59f3e7

Please sign in to comment.