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, ErrorHandler::InvalidRefreshToken, ].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.
16 17 18 |
# File 'lib/rdstation/error_handler/unauthorized.rb', line 16 def initialize(array_of_errors) @array_of_errors = array_of_errors end |
Instance Method Details
#raise_error ⇒ Object
20 21 22 23 |
# File 'lib/rdstation/error_handler/unauthorized.rb', line 20 def raise_error error_classes.each(&:raise_error) raise RDStation::Error::Unauthorized, @array_of_errors.first end |