Class: Tinder::FaradayResponse::RaiseOnAuthenticationFailure

Inherits:
Faraday::Response::Middleware
  • Object
show all
Defined in:
lib/tinder/faraday_response.rb

Class Method Summary collapse

Class Method Details

.register_on_complete(env) ⇒ Object



49
50
51
52
53
# File 'lib/tinder/faraday_response.rb', line 49

def self.register_on_complete(env)
  env[:response].on_complete do |response|
    raise AuthenticationFailed if response[:status] == 401
  end
end