Exception: ApiAdaptor::HTTPErrorResponse
- Defined in:
- lib/api_adaptor/exceptions.rb
Overview
Base class for all HTTP 4xx and 5xx error responses
Provides access to the HTTP status code, error details, and response body.
Direct Known Subclasses
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(code, message = nil, error_details = nil, http_body = nil) ⇒ HTTPErrorResponse
constructor
Initializes a new HTTP error response.
Constructor Details
#initialize(code, message = nil, error_details = nil, http_body = nil) ⇒ HTTPErrorResponse
Initializes a new HTTP error response
53 54 55 56 57 58 |
# File 'lib/api_adaptor/exceptions.rb', line 53 def initialize(code, = nil, error_details = nil, http_body = nil) super() @code = code @error_details = error_details @http_body = http_body end |
Instance Attribute Details
#code ⇒ Integer, ...
45 46 47 |
# File 'lib/api_adaptor/exceptions.rb', line 45 def code @code end |
#error_details ⇒ Integer, ...
45 46 47 |
# File 'lib/api_adaptor/exceptions.rb', line 45 def error_details @error_details end |
#http_body ⇒ Integer, ...
45 46 47 |
# File 'lib/api_adaptor/exceptions.rb', line 45 def http_body @http_body end |