Exception: Prest::RequestError
- Inherits:
-
StandardError
- Object
- StandardError
- Prest::RequestError
- Defined in:
- lib/prest.rb
Overview
Error for when a request is unsuccessful.
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status:, body: '', headers: {}) ⇒ RequestError
constructor
A new instance of RequestError.
Constructor Details
#initialize(status:, body: '', headers: {}) ⇒ RequestError
Returns a new instance of RequestError.
16 17 18 19 20 21 |
# File 'lib/prest.rb', line 16 def initialize(status:, body: '', headers: {}) super() @status = status @body = body @headers = headers end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
14 15 16 |
# File 'lib/prest.rb', line 14 def body @body end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
14 15 16 |
# File 'lib/prest.rb', line 14 def headers @headers end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
14 15 16 |
# File 'lib/prest.rb', line 14 def status @status end |