A json responsed like below and no any exception was threw on server sider when I access a 404 url (springboot 3.1.5):

{
  "timestamp": "2023-12-15 09:11:15",
   "path": "/time",
   "status": 404,
   "error": "Not Found",
   "requestId": "8a3f3980-1"
}

I have not configure any global ExceptionHandler, It should throw a exception and can be caught by global ExceptionHandler, then the response can be adapted to some customized content.

Comment From: bclozel

I have asked for a small project that reproduces the problem. This seems more like a question to me - please reach out on StackOverflow and create a question there. You should add as much details as possible there. It's not clear here if you're asking how to handle such exceptions or if your exception handler is not working. I'm closing this issue as a result.

Comment From: BruceAn1978

Just a simple issue, it will throw an exception on the server sider while accessing a 404 url without any global exception handler. No any exceptions were threw on the server sider and a json response was returned.