Class: ResasKit::Response::RaiseError
- Inherits:
-
Middleware
- Object
- Faraday::Response::Middleware
- Middleware
- ResasKit::Response::RaiseError
- Defined in:
- lib/resas_kit/response/raise_error.rb
Constant Summary collapse
- CODE_ERRORS =
{ 400 => ResasKit::BadRequestError, 403 => ResasKit::ForbiddenError, 404 => ResasKit::NotFoundError, 429 => ResasKit::TooManyRequestsError }.freeze
Instance Attribute Summary
Attributes inherited from Middleware
Instance Method Summary collapse
Instance Method Details
#on_complete(env) ⇒ Object
13 14 15 16 |
# File 'lib/resas_kit/response/raise_error.rb', line 13 def on_complete(env) super raise ResasKit::Error, unless success? end |