lib/faraday/conductivity/selective_errors.rb in faraday-conductivity-1.0.0 vs lib/faraday/conductivity/selective_errors.rb in faraday-conductivity-1.0.1
- old
+ new
@@ -57,10 +57,10 @@
ClientErrorStatuses = (400...500).freeze
ServerErrorStatuses = (500...600).freeze
def initialize(app, options = {})
@app = app
- @on = options.fetch(:on) { ClientErrorStatuses }
+ @on = options.fetch(:on) { ClientErrorStatuses.to_a + ServerErrorStatuses.to_a }
@except = options.fetch(:except) { [] }
end
def call(env)
# capture request because it will be modified during the request