This topic has not yet been written. The content below is from the topic description.
27.2. Resteasy Built-in Internally-Thrown Exceptions Resteasy has a set of built-in exceptions that are thrown by it when it encounters errors during dispatching or marshalling. They all revolve around specific HTTP error codes. You can find them in RESTEasy's javadoc under the package org.jboss.resteasy.spi. Here's a list of them: Table 27.1. Exception HTTP Code Description BadRequestException 400 Bad Request. Request wasn't formatted correctly or problem processing request input. UnauthorizedException 401 Unauthorized. Security exception thrown if you're using Resteasy's simple annotation-based role-based security InternalServerErrorException 500 Internal Server Error. MethodNotAllowedException 405 Method Not Allowed. There is no JAX-RS method for the resource that can handle the invoked HTTP operation. NotAcceptableException 406 Not Acceptable. There is no JAX-RS method that can produce the media types listed in the Accept header. NotFoundException 404 Not Found. There is no JAX-RS method that serves the request path/resource. ReaderException 400 All exceptions thrown from MessageBodyReaders are wrapped within this exception. If there is no ExceptionMapper for the wrapped exception or if the excepiton isn't a WebApplicationException, then resteasy will return a 400 code by default. WriterException 500 All exceptions thrown from MessageBodyWriters are wrapped within this exception. If there is no ExceptionMapper for the wrapped exception or if the exception isn't a WebApplicationException, then resteasy will return a 400 code by default. o.j.r.plugins.providers.jaxb.JAXBUnmarshalException 400 The JAXB providers (XML and Jettison) throw this exception on reads. They may be wrapping JAXBExceptions. This class extends ReaderException o.j.r.plugins.providers.jaxb.JAXBMarshalException 500 The JAXB providers (XML and Jettison) throw this exception on writes. They may be wrapping JAXBExceptions. This class extends WriterException ApplicationException N/A This exception wraps all exceptions thrown from application code. It functions much in the same way as InvocationTargetException. If there is an ExceptionMapper for wrapped exception, then that is used to handle the request. Failure N/A Internal Resteasy. Not logged LoggableFailure N/A Internal Resteasy error. Logged DefaultOptionsMethodException N/A If the user invokes HTTP OPTIONS and no JAX-RS method for it, Resteasy provides a default behavior by throwing this exception