Updated with the better handling of JAX-RS WebApplicationException with
logging and processing the HTTP status codes appropriately.