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.



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_objectObject



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