Exception: BlockGiven::HttpError
- Defined in:
- lib/block_given/errors.rb
Overview
Transport-level failure (non-2xx HTTP status, connection refused, ...).
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, status: nil, body: nil) ⇒ HttpError
constructor
A new instance of HttpError.
Constructor Details
#initialize(message, status: nil, body: nil) ⇒ HttpError
Returns a new instance of HttpError.
22 23 24 25 26 |
# File 'lib/block_given/errors.rb', line 22 def initialize(, status: nil, body: nil) super() @status = status @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
20 21 22 |
# File 'lib/block_given/errors.rb', line 20 def body @body end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
20 21 22 |
# File 'lib/block_given/errors.rb', line 20 def status @status end |