@ExceptionHandler(Exception.class)
public void handleException(final Exception ex, final HttpServletRequest request) {
LOGGER.log(Level.SEVERE, "exception", ex);
throw new BadRequestException();
}
@ResponseStatus(HttpStatus.BAD_REQUEST)
@SuppressWarnings("serial")
public static class BadRequestException extends RuntimeException { }