Closed
Description
Hi,
I've created this repo: https://github.com/bidadh/exception-handling-issue to demonstrate the issue.
You can simply run mvn spring-boot:run and try different http-reques files in the project.
if you try:
GET http://localhost:8080/mono-error-long
or any other requests you'll receive the correct response:
GET http://localhost:8080/mono-error-long
HTTP/1.1 409 Conflict
Content-Type: application/json;charset=UTF-8
Content-Length: 74
{
"message": "Error Happened",
"req": "http://localhost:8080/mono-error-long"
}
However, if you run the following:
GET http://localhost:8080/mono-error-string-map
you'll receive this response:
HTTP/1.1 406 Not Acceptable
Content-Type: application/json;charset=UTF-8
Content-Length: 167
{
"timestamp": "2019-01-12T15:45:47.734+0000",
"path": "/mono-error-string-map",
"status": 406,
"error": "Not Acceptable",
"message": "Could not find acceptable representation"
Thanks,
Arthur