@@ -81,17 +81,31 @@ def initialize(remote_uri)
8181
8282 # Exceptions classes that should bypass retry attempts. If your password didn't work the
8383 # first time, it's not going to the third time.
84- NET_ERRORS = [ :HTTPBadGateway , :HTTPBadRequest , :HTTPFailedDependency ,
85- :HTTPForbidden , :HTTPInsufficientStorage , :HTTPMethodNotAllowed ,
86- :HTTPMovedPermanently , :HTTPNoContent , :HTTPNotFound ,
87- :HTTPNotImplemented , :HTTPPreconditionFailed , :HTTPRequestEntityTooLarge ,
88- :HTTPRequestURITooLong , :HTTPUnauthorized , :HTTPUnprocessableEntity ,
89- :HTTPUnsupportedMediaType , :HTTPVersionNotSupported ] . freeze
90- FAIL_ERRORS = begin
91- fail_errors = [ AuthenticationRequiredError , BadAuthenticationError , AuthenticationForbiddenError , FallbackError , SecurityError ]
92- fail_errors << Gem ::Requirement ::BadRequirementError
93- fail_errors . concat ( NET_ERRORS . map { |e | Gem ::Net . const_get ( e ) } )
94- end . freeze
84+ FAIL_ERRORS = [
85+ AuthenticationRequiredError ,
86+ BadAuthenticationError ,
87+ AuthenticationForbiddenError ,
88+ FallbackError ,
89+ SecurityError ,
90+ Gem ::Requirement ::BadRequirementError ,
91+ Gem ::Net ::HTTPBadGateway ,
92+ Gem ::Net ::HTTPBadRequest ,
93+ Gem ::Net ::HTTPFailedDependency ,
94+ Gem ::Net ::HTTPForbidden ,
95+ Gem ::Net ::HTTPInsufficientStorage ,
96+ Gem ::Net ::HTTPMethodNotAllowed ,
97+ Gem ::Net ::HTTPMovedPermanently ,
98+ Gem ::Net ::HTTPNoContent ,
99+ Gem ::Net ::HTTPNotFound ,
100+ Gem ::Net ::HTTPNotImplemented ,
101+ Gem ::Net ::HTTPPreconditionFailed ,
102+ Gem ::Net ::HTTPRequestEntityTooLarge ,
103+ Gem ::Net ::HTTPRequestURITooLong ,
104+ Gem ::Net ::HTTPUnauthorized ,
105+ Gem ::Net ::HTTPUnprocessableEntity ,
106+ Gem ::Net ::HTTPUnsupportedMediaType ,
107+ Gem ::Net ::HTTPVersionNotSupported ,
108+ ] . freeze
95109
96110 class << self
97111 attr_accessor :disable_endpoint , :api_timeout , :redirect_limit , :max_retries
0 commit comments