Class: PeopleDoc::ResponseHandlers::HandleUnknownFailure

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



50
51
52
53
54
# File 'lib/people_doc/response_handlers.rb', line 50

def call
  fail HTTParty::Error.new(
    "Code #{@httparty.code} - #{@httparty.body}"
  ) unless @httparty.response.is_a?(Net::HTTPSuccess)
end