Exception: Epages::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Epages::Error
- Defined in:
- lib/epages/error.rb
Constant Summary collapse
- ClientError =
Raised when a 4xx HTTP status code is returned
Class.new(self)
- BadRequest =
HTTP status code 400, 401, 403, 404, 405, 406, 409, 410, 422, 429 respectively
Class.new(ClientError)
Class.new(ClientError)
- Forbidden =
Class.new(ClientError)
- NotFound =
Class.new(ClientError)
- MethodNotAllowed =
Class.new(ClientError)
- NotAcceptable =
Class.new(ClientError)
- Conflict =
Class.new(ClientError)
- Gone =
Class.new(ClientError)
- UnprocessableEntity =
Class.new(ClientError)
- TooManyRequests =
Class.new(ClientError)
- ServerError =
Raised when a 5xx HTTP status code is returned
Class.new(self)
- InternalServerError =
HTTP status code 500, 502, 503, 504 respectively
Class.new(ServerError)
- BadGateway =
Class.new(ServerError)
Class.new(ServerError)
- GatewayTimeout =
Class.new(ServerError)
- ERRORS =
{ 400 => Epages::Error::BadRequest, 401 => Epages::Error::Unauthorized, 403 => Epages::Error::Forbidden, 404 => Epages::Error::NotFound, 405 => Epages::Error::MethodNotAllowed, 406 => Epages::Error::NotAcceptable, 409 => Epages::Error::Conflict, 410 => Epages::Error::Gone, 422 => Epages::Error::UnprocessableEntity, 429 => Epages::Error::TooManyRequests, 500 => Epages::Error::InternalServerError, 502 => Epages::Error::BadGateway, 503 => Epages::Error::ServiceUnavailable, 504 => Epages::Error::GatewayTimeout, }
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
3 4 5 |
# File 'lib/epages/error.rb', line 3 def code @code end |