Class: BacklogKit::Response::RaiseError
- Inherits:
-
Middleware
- Object
- Faraday::Response::Middleware
- Middleware
- BacklogKit::Response::RaiseError
- Defined in:
- lib/backlog_kit/response/raise_error.rb
Constant Summary collapse
- CODE_ERRORS =
{ 1 => BacklogKit::InternalError, 2 => BacklogKit::LicenceError, 3 => BacklogKit::LicenceExpiredError, 4 => BacklogKit::AccessDeniedError, 5 => BacklogKit::UnauthorizedOperationError, 6 => BacklogKit::NoResourceError, 7 => BacklogKit::InvalidRequestError, 8 => BacklogKit::SpaceOverCapacityError, 9 => BacklogKit::ResourceOverflowError, 10 => BacklogKit::TooLargeFileError, 11 => BacklogKit::AuthenticationError }.freeze
Instance Attribute Summary
Attributes inherited from Middleware
Instance Method Summary collapse
Instance Method Details
#on_complete(env) ⇒ Object
20 21 22 23 |
# File 'lib/backlog_kit/response/raise_error.rb', line 20 def on_complete(env) super raise BacklogKit::Error, unless success? end |