Exception: Stripe::OAuth::OAuthError
- Inherits:
-
StripeError
- Object
- StandardError
- StripeError
- Stripe::OAuth::OAuthError
- Defined in:
- lib/stripe/errors.rb
Overview
OAuthError is raised when the OAuth API returns an error.
Direct Known Subclasses
InvalidClientError, InvalidGrantError, InvalidRequestError, InvalidScopeError, UnsupportedGrantTypeError, UnsupportedResponseTypeError
Instance Attribute Summary
Attributes inherited from StripeError
#code, #error, #http_body, #http_headers, #http_status, #json_body, #message, #request_id, #response
Instance Method Summary collapse
- #construct_error_object ⇒ Object
-
#initialize(code, description, http_status: nil, http_body: nil, json_body: nil, http_headers: nil) ⇒ OAuthError
constructor
A new instance of OAuthError.
Methods inherited from StripeError
Constructor Details
#initialize(code, description, http_status: nil, http_body: nil, json_body: nil, http_headers: nil) ⇒ OAuthError
Returns a new instance of OAuthError.
124 125 126 127 128 129 |
# File 'lib/stripe/errors.rb', line 124 def initialize(code, description, http_status: nil, http_body: nil, json_body: nil, http_headers: nil) super(description, http_status: http_status, http_body: http_body, json_body: json_body, http_headers: http_headers, code: code) end |
Instance Method Details
#construct_error_object ⇒ Object
131 132 133 134 135 |
# File 'lib/stripe/errors.rb', line 131 def construct_error_object return nil if @json_body.nil? OAuthErrorObject.construct_from(@json_body, {}, nil, :v1) end |