class Athena::Routing::Exceptions::AthenaException
- Athena::Routing::Exceptions::AthenaException
- Exception
- Reference
- Object
Overview
A generic exception that can be thrown with to render consistent exception responses with the given code and message.
Direct Known Subclasses
- Athena::Routing::Exceptions::ConflictException
- Athena::Routing::Exceptions::ExpectationFailedException
- Athena::Routing::Exceptions::FailedDependencyException
- Athena::Routing::Exceptions::ForbiddenException
- Athena::Routing::Exceptions::GoneException
- Athena::Routing::Exceptions::ImATeapotException
- Athena::Routing::Exceptions::LengthRequiredException
- Athena::Routing::Exceptions::LockedException
- Athena::Routing::Exceptions::MethodNotAllowedException
- Athena::Routing::Exceptions::MisdirectedRequestException
- Athena::Routing::Exceptions::NotAcceptableException
- Athena::Routing::Exceptions::NotFoundException
- Athena::Routing::Exceptions::PayloadTooLargeException
- Athena::Routing::Exceptions::PaymentRequiredException
- Athena::Routing::Exceptions::PreconditionFailedException
- Athena::Routing::Exceptions::PreconditionRequiredException
- Athena::Routing::Exceptions::ProxyAuthenticationRequiredException
- Athena::Routing::Exceptions::RangeNotSatisfiableException
- Athena::Routing::Exceptions::RequestHeaderFieldsTooLargeException
- Athena::Routing::Exceptions::RequestTimeoutException
- Athena::Routing::Exceptions::TooManyRequestsException
- Athena::Routing::Exceptions::UnauthorizedException
- Athena::Routing::Exceptions::UnavailableForLegalReasonsException
- Athena::Routing::Exceptions::UnprocessableEntityException
- Athena::Routing::Exceptions::UnsupportedMediaTypeException
- Athena::Routing::Exceptions::UpgradeRequiredException
- Athena::Routing::Exceptions::URITooLongException
Defined in:
routing/exceptions.crConstructors
Instance Method Summary
- #code : Int32
-
#to_json : String
Serializes the exception into a JSON object with the given code and message.
Constructor Detail
Instance Method Detail
def to_json : String
#
Serializes the exception into a JSON object with the given code and message.
{
"code": 409,
"message": "A user with this email already exists.",
}