Default Error Page and the /error Fallback
Learn Default Error Page and the /error Fallback (Exception Handling, Spring Boot) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
What Happens If You Handle Nothing Even with no @ExceptionHandler at all, Spring Boot never leaves the client with a raw stack trace. When an exception escapes a controller, or a URL matches nothing, the servlet container forwards the request internally to /error , where Boot's BasicErrorController builds a response. This is your safety net , and it is what a client sees for every error your own handlers did not catch.