public
Description: A Rails plugin to use exceptions for generating HTTP status responses.
Home | Edit | New

AvailableExceptions

The list of available exceptions is based on the list of status codes that is available in Rails. The plugin will automatically create an exception class for every status code mentioned in this file, using the message of the status code. For instance "Not found" becomes HTTPStatus::NotFound and "Request-URI Too Long" becomes HTTPStatus::RequestURITooLong.

All exception classes are based on HTTPStatus::Base which is defined in this plugin and contains some shared functionality for these exception classes.

HTTPStatus exception class list

Exception class Error code
HTTPStatus::BadRequest 400
HTTPStatus::Unauthorized 401
HTTPStatus::PaymentRequired 402
HTTPStatus::Forbidden 403
HTTPStatus::NotFound 404
HTTPStatus::MethodNotAllowed 405
HTTPStatus::NotAcceptable 406
HTTPStatus::ProxyAuthenticationRequired 407
HTTPStatus::RequestTimeout 408
HTTPStatus::Conflict 409
HTTPStatus::Gone 410
HTTPStatus::LengthRequired 411
HTTPStatus::PreconditionFailed 412
HTTPStatus::RequestEntityTooLarge 413
HTTPStatus::RequestURITooLong 414
HTTPStatus::UnsupportedMediaType 415
HTTPStatus::RequestedRangeNotSatisfiable 416
HTTPStatus::ExpectationFailed 417
HTTPStatus::UnprocessableEntity 422
HTTPStatus::Locked 423
HTTPStatus::FailedDependency 424
HTTPStatus::UpgradeRequired 426
HTTPStatus::InternalServerError 500
HTTPStatus::NotImplemented 501
HTTPStatus::BadGateway 502
HTTPStatus::ServiceUnavailable 503
HTTPStatus::GatewayTimeout 504
HTTPStatus::HTTPVersionNotSupported 505
HTTPStatus::InsufficientStorage 507
HTTPStatus::NotExtended 510
Last edited by wvanbergen, Thu Jan 29 11:26:57 -0800 2009
Home | Edit | New
Versions: