Exception: Keycardai::OAuth::HTTPError

Inherits:
Error
  • Object
show all
Defined in:
lib/keycardai/oauth/errors.rb

Overview

A non-2xx HTTP response. Carries the status code and response body.

Direct Known Subclasses

OAuthError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, status:, body: "") ⇒ HTTPError

Returns a new instance of HTTPError.



24
25
26
27
28
# File 'lib/keycardai/oauth/errors.rb', line 24

def initialize(message, status:, body: "")
  super(message)
  @status = status
  @body = body
end

Instance Attribute Details

#bodyString (readonly)

Returns:

  • (String)


22
23
24
# File 'lib/keycardai/oauth/errors.rb', line 22

def body
  @body
end

#statusInteger (readonly)

Returns:

  • (Integer)


20
21
22
# File 'lib/keycardai/oauth/errors.rb', line 20

def status
  @status
end