Exception: Namira::Errors::HTTPError
- Defined in:
- lib/namira/errors/http_error.rb
Overview
HTTP Error
Any non 2xx status code will raise this error.
Instance Attribute Summary collapse
-
#response ⇒ Namira::Response
readonly
The HTTP response.
-
#status ⇒ Integer
readonly
The HTTP status that caused the error.
Instance Method Summary collapse
-
#initialize(msg, status, response) ⇒ HTTPError
constructor
Returns a new instance of HTTPError.
Constructor Details
#initialize(msg, status, response) ⇒ HTTPError
Returns a new instance of HTTPError
22 23 24 25 26 |
# File 'lib/namira/errors/http_error.rb', line 22 def initialize(msg, status, response) @status = status @response = response super(msg) end |
Instance Attribute Details
#response ⇒ Namira::Response (readonly)
Returns The HTTP response.
14 15 16 |
# File 'lib/namira/errors/http_error.rb', line 14 def response @response end |
#status ⇒ Integer (readonly)
Returns The HTTP status that caused the error.
10 11 12 |
# File 'lib/namira/errors/http_error.rb', line 10 def status @status end |