Class: RDStation::ErrorHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/rdstation/error_handler.rb,
lib/rdstation/error_handler/default.rb,
lib/rdstation/error_handler/unauthorized.rb,
lib/rdstation/error_handler/conflicting_field.rb,
lib/rdstation/error_handler/expired_code_grant.rb,
lib/rdstation/error_handler/invalid_event_type.rb,
lib/rdstation/error_handler/resource_not_found.rb,
lib/rdstation/error_handler/invalid_credentials.rb,
lib/rdstation/error_handler/expired_access_token.rb

Defined Under Namespace

Classes: ConflictingField, Default, ExpiredAccessToken, ExpiredCodeGrant, InvalidCredentials, InvalidEventType, ResourceNotFound, Unauthorized

Constant Summary collapse

ERROR_TYPES =
[
  ErrorHandler::ConflictingField,
  ErrorHandler::ExpiredAccessToken,
  ErrorHandler::ExpiredCodeGrant,
  ErrorHandler::InvalidCredentials,
  ErrorHandler::InvalidEventType,
  ErrorHandler::ResourceNotFound,
  ErrorHandler::Unauthorized,
  ErrorHandler::Default
].freeze

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ ErrorHandler

Returns a new instance of ErrorHandler.



24
25
26
# File 'lib/rdstation/error_handler.rb', line 24

def initialize(response)
  @response = response
end

Instance Method Details

#raise_errorsObject



28
29
30
# File 'lib/rdstation/error_handler.rb', line 28

def raise_errors
  error_types.each(&:raise_error)
end