Exception: Keycardai::OAuth::OAuthError
- Defined in:
- lib/keycardai/oauth/errors.rb
Overview
An OAuth error response from the authorization server (RFC 6749 ยง5.2). Carries the wire error code plus the optional description and URI.
Instance Attribute Summary collapse
-
#error ⇒ String
readonly
The OAuth error code (e.g. invalid_grant).
- #error_description ⇒ String? readonly
- #error_uri ⇒ String? readonly
Attributes inherited from HTTPError
Instance Method Summary collapse
-
#initialize(message, error:, status:, body: "", error_description: nil, error_uri: nil) ⇒ OAuthError
constructor
A new instance of OAuthError.
Constructor Details
#initialize(message, error:, status:, body: "", error_description: nil, error_uri: nil) ⇒ OAuthError
Returns a new instance of OAuthError.
41 42 43 44 45 46 |
# File 'lib/keycardai/oauth/errors.rb', line 41 def initialize(, error:, status:, body: "", error_description: nil, error_uri: nil) super(, status: status, body: body) @error = error @error_description = error_description @error_uri = error_uri end |
Instance Attribute Details
#error ⇒ String (readonly)
Returns the OAuth error code (e.g. invalid_grant).
35 36 37 |
# File 'lib/keycardai/oauth/errors.rb', line 35 def error @error end |
#error_description ⇒ String? (readonly)
37 38 39 |
# File 'lib/keycardai/oauth/errors.rb', line 37 def error_description @error_description end |
#error_uri ⇒ String? (readonly)
39 40 41 |
# File 'lib/keycardai/oauth/errors.rb', line 39 def error_uri @error_uri end |