When possible, exceptions caught by a resource method should cause a useful error to be returned to
the requesting consumer. JAX-RS resource methods can throw a
WebApplicaitonException
exception. You can also provide
ExceptionMapper<E>
implementations to map exceptions to
appropriate responses.