Class: AdpClient::ResourceNotFoundHandler

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



275
276
277
278
279
280
281
282
283
284
285
# File 'lib/adp_client.rb', line 275

def error
  ResourceNotFound.new(
    @httparty
      .parsed_response
      .fetch('confirmMessage', {})
      .fetch('processMessages', [{}])
      .first
      .fetch('userMessage', {})
      .fetch('messageTxt', 'No userMessage messageTxt found')
  )
end

#fail?Boolean

Returns:

  • (Boolean)


287
288
289
# File 'lib/adp_client.rb', line 287

def fail?
  @httparty.code == 404
end