Exception: AnkiConnect::HTTPError
- Defined in:
- lib/anki_connect/client.rb
Overview
Error raised for a non-successful HTTP response.
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(message = nil, status:, body:, **context) ⇒ HTTPError
constructor
A new instance of HTTPError.
Constructor Details
#initialize(message = nil, status:, body:, **context) ⇒ HTTPError
Returns a new instance of HTTPError.
182 183 184 185 186 |
# File 'lib/anki_connect/client.rb', line 182 def initialize( = nil, status:, body:, **context) @status = status @body = body super(, **context) end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
180 181 182 |
# File 'lib/anki_connect/client.rb', line 180 def body @body end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
180 181 182 |
# File 'lib/anki_connect/client.rb', line 180 def status @status end |