Class: ReamazeAPI::Client::RaiseErrorMiddleware
- Inherits:
-
Faraday::Response::Middleware
- Object
- Faraday::Response::Middleware
- ReamazeAPI::Client::RaiseErrorMiddleware
- Defined in:
- lib/reamaze_api/client.rb
Overview
Raises a ReamazeAPI::Error for any HTTP response code 400-599.
Instance Method Summary collapse
-
#on_complete(response) ⇒ void
private
Private: Raises a ReamazeAPI::Error for any HTTP response code 400-599.
Instance Method Details
#on_complete(response) ⇒ void (private)
This method returns an undefined value.
Private: Raises a ReamazeAPI::Error for any HTTP response code 400-599.
16 17 18 19 20 |
# File 'lib/reamaze_api/client.rb', line 16 def on_complete(response) if error = ReamazeAPI::Error.from_response(response) raise error end end |