I deployed Spring REST API to heroku, in my local environmet for 4xx status code I throw ResponseStatusException and the request get back json of :
{
"timestamp": "2023-01-18T12:20:31.460+00:00",
"status": 401,
"error": "Unauthorized",
"message": "Bad credentials",
"path": "/api/login/employee"
}
on heroku I get back from the same request the response:
{
"timestamp": "2023-01-18T12:21:54.678+00:00",
"status": 401,
"error": "Unauthorized",
"path": "/api/login/employee"
}
i.e I didnt get the message field in heroku. Its happens to each 4xx error. Why is that and how can I fix it?
I tried to test it on postman when runing in localhost and in heroku. in heroku i didnt get back "message" field