Class: PactasItero::Response::RaiseError
- Inherits:
-
Faraday::Middleware
- Object
- Faraday::Middleware
- PactasItero::Response::RaiseError
- Defined in:
- lib/pactas_itero/response/raise_error.rb
Overview
This class raises an PactasItero-flavored exception based HTTP status codes returned by the API
Instance Method Summary collapse
Instance Method Details
#on_complete(response) ⇒ Object
12 13 14 15 16 |
# File 'lib/pactas_itero/response/raise_error.rb', line 12 def on_complete(response) if (error = PactasItero::Error.from_response(response)) raise error end end |