Class: Tama::Error::HTTPError
- Inherits:
-
Error
- Object
- Error
- Tama::Error::HTTPError
- Defined in:
- lib/tama/error.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(message = nil, status:, body: nil) ⇒ HTTPError
constructor
A new instance of HTTPError.
Constructor Details
#initialize(message = nil, status:, body: nil) ⇒ HTTPError
Returns a new instance of HTTPError.
21 22 23 24 25 |
# File 'lib/tama/error.rb', line 21 def initialize( = nil, status:, body: nil) @status = status @body = body super( || "HTTP request failed with status #{status}") end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
19 20 21 |
# File 'lib/tama/error.rb', line 19 def body @body end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
19 20 21 |
# File 'lib/tama/error.rb', line 19 def status @status end |