Exception: TheOneApi::HttpResponseError
- Defined in:
- lib/the_one_api/http_response_error.rb
Overview
Our own error class to throw for HTTP response errors
Good encapsulation to not expose our consumers to the error types of the underlying libraries unintentionally
Instance Attribute Summary collapse
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status, msg = nil) ⇒ HttpResponseError
constructor
A new instance of HttpResponseError.
Constructor Details
#initialize(status, msg = nil) ⇒ HttpResponseError
Returns a new instance of HttpResponseError.
11 12 13 14 |
# File 'lib/the_one_api/http_response_error.rb', line 11 def initialize(status, msg = nil) @status = status super(msg) end |
Instance Attribute Details
#status ⇒ Object (readonly)
Returns the value of attribute status.
9 10 11 |
# File 'lib/the_one_api/http_response_error.rb', line 9 def status @status end |