Exception: Procore::OAuthError
- Defined in:
- lib/procore/errors.rb
Overview
Raised whenever there is a problem with OAuth. Possible causes: required credentials are missing or an access token failed to refresh.
Instance Attribute Summary
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(message, response: nil) ⇒ OAuthError
constructor
A new instance of OAuthError.
Constructor Details
#initialize(message, response: nil) ⇒ OAuthError
Returns a new instance of OAuthError.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/procore/errors.rb', line 40 def initialize(, response: nil) @message = duck_response = if response OpenStruct.new( code: response.status, body: response.parsed.presence || response.body, headers: response.headers, request: OpenStruct.new( options: {}, path: nil, ), ) end super(, response: duck_response) end |