Class: AdpClient::BadRequestHandler

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



250
251
252
# File 'lib/adp_client.rb', line 250

def error
  BadRequest.new('Looks like a Bad Request', @httparty.parsed_response)
end

#fail?Boolean

Returns:

  • (Boolean)


254
255
256
# File 'lib/adp_client.rb', line 254

def fail?
  @httparty.parsed_response['error'].nil? && @httparty.code == 400
end