Class: AdpClient::UnauthorizedHandler

Inherits:
BaseErrorHandler show all
Defined in:
lib/adp_client.rb

Instance Method Summary collapse

Methods inherited from BaseErrorHandler

#call, #initialize

Constructor Details

This class inherits a constructor from AdpClient::BaseErrorHandler

Instance Method Details

#errorObject



293
294
295
296
297
298
299
# File 'lib/adp_client.rb', line 293

def error
  Unauthorized.new(
    format('%<error>s: %<description>s',
           error: @httparty.parsed_response['error'],
           description: @httparty.parsed_response['error_description'])
  )
end

#fail?Boolean

Returns:

  • (Boolean)


301
302
303
# File 'lib/adp_client.rb', line 301

def fail?
  @httparty.code == 401
end