Exception: OnyxCord::Errors::HTTPError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- OnyxCord::Errors::HTTPError
- Defined in:
- lib/onyxcord/core/errors.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#route ⇒ Object
readonly
Returns the value of attribute route.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(message = nil, status: nil, code: 0, headers: {}, route: nil, body: nil, response: nil) ⇒ HTTPError
constructor
A new instance of HTTPError.
Constructor Details
#initialize(message = nil, status: nil, code: 0, headers: {}, route: nil, body: nil, response: nil) ⇒ HTTPError
Returns a new instance of HTTPError.
20 21 22 23 24 25 26 27 28 |
# File 'lib/onyxcord/core/errors.rb', line 20 def initialize( = nil, status: nil, code: 0, headers: {}, route: nil, body: nil, response: nil) super() @status = status @code = code || 0 @headers = headers @route = route @body = body @response = response end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
18 19 20 |
# File 'lib/onyxcord/core/errors.rb', line 18 def body @body end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
18 19 20 |
# File 'lib/onyxcord/core/errors.rb', line 18 def code @code end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
18 19 20 |
# File 'lib/onyxcord/core/errors.rb', line 18 def headers @headers end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
18 19 20 |
# File 'lib/onyxcord/core/errors.rb', line 18 def response @response end |
#route ⇒ Object (readonly)
Returns the value of attribute route.
18 19 20 |
# File 'lib/onyxcord/core/errors.rb', line 18 def route @route end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
18 19 20 |
# File 'lib/onyxcord/core/errors.rb', line 18 def status @status end |