Exception: AnkiConnect::HTTPError

Inherits:
Error
  • Object
show all
Defined in:
lib/anki_connect/client.rb

Overview

Error raised for a non-successful HTTP response.

Instance Attribute Summary collapse

Attributes inherited from Error

#action

Instance Method Summary collapse

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(message = nil, status:, body:, **context)
  @status = status
  @body = body
  super(message, **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