Exception: Stripe::OAuth::OAuthError

Inherits:
StripeError
  • Object
show all
Defined in:
lib/stripe/errors.rb

Overview

OAuthError is raised when the OAuth API returns an error.

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

Methods inherited from StripeError

#idempotent_replayed?, #to_s

Constructor Details

#initialize(code, description, http_status: nil, http_body: nil, json_body: nil, http_headers: nil) ⇒ OAuthError

Returns a new instance of OAuthError.



123
124
125
126
127
128
# File 'lib/stripe/errors.rb', line 123

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_objectObject



130
131
132
133
134
# File 'lib/stripe/errors.rb', line 130

def construct_error_object
  return nil if @json_body.nil?

  OAuthErrorObject.construct_from(@json_body)
end