summaryrefslogtreecommitdiff
path: root/lib/bundler/fetcher.rb
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2015-12-26 14:58:20 +0800
committerSamuel Giddins <segiddins@segiddins.me>2016-01-25 10:49:44 -0600
commit8b9e5c9b0d62b94b81d3f9b3dcc1146535f1df42 (patch)
treedbb8ef46737d8ce03b26e4e15183ef2d892d88cd /lib/bundler/fetcher.rb
parent055cf138ca10052aab521826eca1c5f5436958c2 (diff)
downloadbundler-8b9e5c9b0d62b94b81d3f9b3dcc1146535f1df42.tar.gz
cancel retries on 404 Not Found
by raising FallbackError on 404 as well as 413, and then adding FallbackError to the list of errors to not retry, we both cancel retries for 404s and incidentally also cancel retries on 413s.
Diffstat (limited to 'lib/bundler/fetcher.rb')
-rw-r--r--lib/bundler/fetcher.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler/fetcher.rb b/lib/bundler/fetcher.rb
index 2c60efc3b1..bff6d5c2fb 100644
--- a/lib/bundler/fetcher.rb
+++ b/lib/bundler/fetcher.rb
@@ -53,14 +53,14 @@ module Bundler
# Exceptions classes that should bypass retry attempts. If your password didn't work the
# first time, it's not going to the third time.
- AUTH_ERRORS = [AuthenticationRequiredError, BadAuthenticationError]
+ FAIL_ERRORS = [AuthenticationRequiredError, BadAuthenticationError, FallbackError]
NET_ERRORS = [:HTTPBadGateway, :HTTPBadRequest, :HTTPFailedDependency,
:HTTPForbidden, :HTTPInsufficientStorage, :HTTPMethodNotAllowed,
:HTTPMovedPermanently, :HTTPNoContent, :HTTPNotFound,
:HTTPNotImplemented, :HTTPPreconditionFailed, :HTTPRequestEntityTooLarge,
:HTTPRequestURITooLong, :HTTPUnauthorized, :HTTPUnprocessableEntity,
:HTTPUnsupportedMediaType, :HTTPVersionNotSupported]
- AUTH_ERRORS.push(*NET_ERRORS.map {|e| SharedHelpers.const_get_safely(e, Net) }.compact)
+ FAIL_ERRORS.push(*NET_ERRORS.map {|e| SharedHelpers.const_get_safely(e, Net) }.compact)
class << self
attr_accessor :disable_endpoint, :api_timeout, :redirect_limit, :max_retries