class MdNotes::OAuthProviderException

OAuth 2 Authorization endpoint exception.

Attributes

error[RW]

Gets or sets error code. @return [OAuthProviderErrorEnum]

error_description[RW]

Gets or sets human-readable text providing additional information on error. Used to assist the client developer in understanding the error that occurred. @return [String]

error_uri[RW]

Gets or sets a URI identifying a human-readable web page with information about the error, used to provide the client developer with additional information about the error. @return [String]

Public Class Methods

new(reason, response) click to toggle source

The constructor. @param [String] The reason for raising an exception. @param [HttpResponse] The HttpReponse of the API call.

Calls superclass method MdNotes::APIException::new
# File lib/md_notes/exceptions/o_auth_provider_exception.rb, line 29
def initialize(reason, response)
  super(reason, response)
  hash = APIHelper.json_deserialize(@response.raw_body)
  unbox(hash)
end

Public Instance Methods

unbox(hash) click to toggle source

Populates this object by extracting properties from a hash. @param [Hash] The deserialized response sent by the server in the response body.

# File lib/md_notes/exceptions/o_auth_provider_exception.rb, line 38
def unbox(hash)
  @error = hash['error']
  @error_description = hash['error_description']
  @error_uri = hash['error_uri']
end