Exception: Pepipost::APIException

Inherits:
StandardError
  • Object
show all
Defined in:
lib/pepipost/api_exception.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(reason, response_code, response_body) ⇒ APIException

The HTTP response code from the API request

Parameters:

  • the (String)

    reason for raising an exception

  • the (Numeric)

    HTTP response code from the API request

  • the (Object)

    HTTP unprased response from the API request



13
14
15
16
17
# File 'lib/pepipost/api_exception.rb', line 13

def initialize(reason, response_code, response_body)
  super(reason)
  @response_code = response_code
  @response_body = response_body
end

Instance Attribute Details

#response_bodyObject (readonly)

value store



7
8
9
# File 'lib/pepipost/api_exception.rb', line 7

def response_body
  @response_body
end

#response_codeObject (readonly)

value store



4
5
6
# File 'lib/pepipost/api_exception.rb', line 4

def response_code
  @response_code
end