public Response toResponse(Exception e) {
    LOG.error(e.getMessage(), e);
    if (e instanceof NotFoundException) {
      return SimpleWebException.buildMessage(HttpStatus.NOT_FOUND_404, null, e.getMessage());
    }
    return SimpleWebException.buildMessage(HttpStatus.INTERNAL_SERVER_ERROR_500, null, e.getMessage());
  }
Map all exceptions to the Jersey response.  This lets us have nice
results in the error body.
hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/CatchallExceptionMapper.java