Class: Nylas::NylasOAuthError

Inherits:
AbstractNylasApiError show all
Defined in:
lib/nylas/errors.rb

Overview

Error class representing a failed response from the Nylas OAuth integration.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error, error_description, error_uri, error_code, status_code) ⇒ NylasOAuthError

Initializes an error and assigns the given attributes to it.

Parameters:

  • error (String)

    Error type.

  • error_description (String)

    Description of the error.

  • error_uri (String)

    Error URI.

  • error_code (String)

    Error code.

  • status_code (String)

    Error status code.



59
60
61
62
63
64
65
66
# File 'lib/nylas/errors.rb', line 59

def initialize(error, error_description, error_uri, error_code, status_code)
  super(error_description)
  self.error = error
  self.error_description = error_description
  self.error_uri = error_uri
  self.error_code = error_code
  self.status_code = status_code
end

Instance Attribute Details

#errorObject

Returns the value of attribute error.



50
51
52
# File 'lib/nylas/errors.rb', line 50

def error
  @error
end

#error_codeObject

Returns the value of attribute error_code.



50
51
52
# File 'lib/nylas/errors.rb', line 50

def error_code
  @error_code
end

#error_descriptionObject

Returns the value of attribute error_description.



50
51
52
# File 'lib/nylas/errors.rb', line 50

def error_description
  @error_description
end

#error_uriObject

Returns the value of attribute error_uri.



50
51
52
# File 'lib/nylas/errors.rb', line 50

def error_uri
  @error_uri
end

#status_codeObject

Returns the value of attribute status_code.



50
51
52
# File 'lib/nylas/errors.rb', line 50

def status_code
  @status_code
end