Class: Johac::Connection::Middleware::RaiseError
- Inherits:
-
Faraday::Response::Middleware
- Object
- Faraday::Response::Middleware
- Johac::Connection::Middleware::RaiseError
- Defined in:
- lib/johac/connection.rb
Overview
Will raise some Error::ResponseError from an HTTP response using status codes.
Instance Method Summary collapse
Instance Method Details
#on_complete(env) ⇒ Object
148 149 150 151 152 |
# File 'lib/johac/connection.rb', line 148 def on_complete(env) if e = ::Johac::Error::ResponseError.from_response(env.status, env.response_headers, env.body) raise e end end |