Class: Response::RaiseOnAuthenticationFailure

Inherits:
Middleware
  • Object
show all
Defined in:
lib/faraday/response/raise_on_authentication_failure.rb

Instance Method Summary collapse

Instance Method Details

#on_complete(response) ⇒ Object



6
7
8
# File 'lib/faraday/response/raise_on_authentication_failure.rb', line 6

def on_complete(response)
  raise Tinder::AuthenticationFailed if [401, 404].include?(response[:status])
end