Exception: Freefeed::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Freefeed::Error
- Defined in:
- lib/freefeed/error.rb
Constant Summary collapse
- ClientError =
Class.new(self)
- ServerError =
Class.new(self)
- BadRequest =
Class.new(ClientError)
- Forbidden =
Class.new(ClientError)
- NotAcceptable =
Class.new(ClientError)
- NotFound =
Class.new(ClientError)
- RequestEntityTooLarge =
Class.new(ClientError)
- TooManyRequests =
Class.new(ClientError)
Class.new(ClientError)
- UnprocessableEntity =
Class.new(ClientError)
- BadGateway =
Class.new(ServerError)
- GatewayTimeout =
Class.new(ServerError)
- InternalServerError =
Class.new(ServerError)
Class.new(ServerError)
- ERRORS =
{ 400 => Freefeed::Error::BadRequest, 401 => Freefeed::Error::Unauthorized, 403 => Freefeed::Error::Forbidden, 404 => Freefeed::Error::NotFound, 406 => Freefeed::Error::NotAcceptable, 413 => Freefeed::Error::RequestEntityTooLarge, 422 => Freefeed::Error::UnprocessableEntity, 429 => Freefeed::Error::TooManyRequests, 500 => Freefeed::Error::InternalServerError, 502 => Freefeed::Error::BadGateway, 503 => Freefeed::Error::ServiceUnavailable, 504 => Freefeed::Error::GatewayTimeout }.freeze
Class Method Summary collapse
-
.for(response) ⇒ Object
TODO: Populate error object with details.
Class Method Details
.for(response) ⇒ Object
TODO: Populate error object with details
38 39 40 |
# File 'lib/freefeed/error.rb', line 38 def self.for(response) ERRORS[response.code] end |