Class: Bearcat::ExtendedRaiseFootrestErrors
- Inherits:
-
Footrest::RaiseFootrestErrors
- Object
- Footrest::RaiseFootrestErrors
- Bearcat::ExtendedRaiseFootrestErrors
- Defined in:
- lib/bearcat/client.rb
Overview
Overridden response error middleware that, if an error code doesn’t map to an exception, raises a more generic exception
Instance Method Summary collapse
Instance Method Details
#on_complete(response) ⇒ Object
127 128 129 130 131 |
# File 'lib/bearcat/client.rb', line 127 def on_complete(response) super key = response[:status].to_i raise ERROR_MAP[key.floor(-2)], response if key >= 400 end |