Class: PeopleDoc::ResponseHandlers::V2::HandleBadRequest

Inherits:
BaseHandler
  • Object
show all
Defined in:
lib/people_doc/response_handlers.rb

Instance Method Summary collapse

Methods inherited from BaseHandler

#initialize

Constructor Details

This class inherits a constructor from PeopleDoc::ResponseHandlers::BaseHandler

Instance Method Details

#callObject



100
101
102
103
104
105
106
# File 'lib/people_doc/response_handlers.rb', line 100

def call
  return unless @httparty.code == 400

  message = @httparty.parsed_response['error_description']

  fail BadRequest.new(message, @httparty.parsed_response)
end