Class: Putio::Middleware::ErrorHandler

Inherits:
Faraday::Response::Middleware
  • Object
show all
Defined in:
lib/putio-ruby/middleware/error_handler.rb

Instance Method Summary collapse

Instance Method Details

#on_complete(env) ⇒ Object



4
5
6
# File 'lib/putio-ruby/middleware/error_handler.rb', line 4

def on_complete(env)
  raise Putio::Error.from_env(env) if env.status >= 400
end