I played more examples of exception handling except the ones mentioned in #4042 . The following exception handling should work. ```java @ExceptionHandler(Exception2.class) public void handleException2(Exception2 e, HttpServletResponse response) throws IOException { response.setHeader("Content-Type", "application/json"); response.getWriter().write(e.getMessage()); response.sendError(HttpServletResponse.SC_BAD_REQUEST); } ``` But in the startup stage, Quarkus will complain it should be used with a `@ResponseStatus`.