Class: RDStation::ErrorHandler::Unauthorized
- Inherits:
-
Object
- Object
- RDStation::ErrorHandler::Unauthorized
- Defined in:
- lib/rdstation/error_handler/unauthorized.rb
Constant Summary collapse
- UNAUTHORIZED_ERRORS =
[ ErrorHandler::ExpiredAccessToken, ErrorHandler::ExpiredCodeGrant, ErrorHandler::InvalidCredentials, ].freeze
Instance Method Summary collapse
-
#initialize(array_of_errors) ⇒ Unauthorized
constructor
A new instance of Unauthorized.
- #raise_error ⇒ Object
Constructor Details
#initialize(array_of_errors) ⇒ Unauthorized
Returns a new instance of Unauthorized.
14 15 16 |
# File 'lib/rdstation/error_handler/unauthorized.rb', line 14 def initialize(array_of_errors) @array_of_errors = array_of_errors end |
Instance Method Details
#raise_error ⇒ Object
18 19 20 21 |
# File 'lib/rdstation/error_handler/unauthorized.rb', line 18 def raise_error error_classes.each(&:raise_error) raise RDStation::Error::Unauthorized, @array_of_errors.first end |