Class: Response::RaiseHttp4xx
- Inherits:
-
Middleware
- Object
- Middleware
- Response::RaiseHttp4xx
- Defined in:
- lib/faraday/raise_http_4xx.rb
Instance Method Summary collapse
Instance Method Details
#on_complete(env) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/faraday/raise_http_4xx.rb', line 6 def on_complete(env) env[:response].on_complete do |response| case response[:status].to_i when 404 raise JustGiving::NotFound, (response) end end end |