Exception: Zoreal::OAuth2::ExchangeError
- Defined in:
- lib/zoreal/oauth2/errors.rb
Overview
The provider refused the code exchange. oauth_error is the RFC 6749
error code and description the provider's own reason, verbatim: the
provider's words are the only signal that says WHY (a consumed code, a
PKCE mismatch, a lapsed sector), and rewriting them hides it.
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#oauth_error ⇒ Object
readonly
Returns the value of attribute oauth_error.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(oauth_error, description, status: nil) ⇒ ExchangeError
constructor
A new instance of ExchangeError.
Constructor Details
#initialize(oauth_error, description, status: nil) ⇒ ExchangeError
Returns a new instance of ExchangeError.
15 16 17 18 19 20 |
# File 'lib/zoreal/oauth2/errors.rb', line 15 def initialize(oauth_error, description, status: nil) @oauth_error = oauth_error @description = description @status = status super([oauth_error, description].compact.join(': ')) end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
13 14 15 |
# File 'lib/zoreal/oauth2/errors.rb', line 13 def description @description end |
#oauth_error ⇒ Object (readonly)
Returns the value of attribute oauth_error.
13 14 15 |
# File 'lib/zoreal/oauth2/errors.rb', line 13 def oauth_error @oauth_error end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
13 14 15 |
# File 'lib/zoreal/oauth2/errors.rb', line 13 def status @status end |