Class: Easee::AmazonGwMiddleware
- Inherits:
-
Faraday::Middleware
- Object
- Faraday::Middleware
- Easee::AmazonGwMiddleware
- Defined in:
- lib/easee/amazon_gw_middleware.rb
Instance Method Summary collapse
Instance Method Details
#on_complete(env) ⇒ Object
3 4 5 6 7 8 |
# File 'lib/easee/amazon_gw_middleware.rb', line 3 def on_complete(env) return unless env.response_headers["X-Amzn-Errortype"] == "ForbiddenException" response_values = Faraday::Response::RaiseError.new.response_values(env) raise(Faraday::ForbiddenError, response_values) end |