Exception: ApiAdaptor::HTTPErrorResponse

Inherits:
BaseError
  • Object
show all
Defined in:
lib/api_adaptor/exceptions.rb

Overview

Superclass for all 4XX and 5XX errors

Direct Known Subclasses

HTTPClientError, HTTPServerError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, message = nil, error_details = nil, http_body = nil) ⇒ HTTPErrorResponse

Returns a new instance of HTTPErrorResponse.



19
20
21
22
23
24
# File 'lib/api_adaptor/exceptions.rb', line 19

def initialize(code, message = nil, error_details = nil, http_body = nil)
  super(message)
  @code = code
  @error_details = error_details
  @http_body = http_body
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



17
18
19
# File 'lib/api_adaptor/exceptions.rb', line 17

def code
  @code
end

#error_detailsObject

Returns the value of attribute error_details.



17
18
19
# File 'lib/api_adaptor/exceptions.rb', line 17

def error_details
  @error_details
end

#http_bodyObject

Returns the value of attribute http_body.



17
18
19
# File 'lib/api_adaptor/exceptions.rb', line 17

def http_body
  @http_body
end