sibari
sibari

Reputation: 1

in spring boot app a rest api returns a response fields different from my response dto when an exception like 500 occurs

Getting this response but timestamp and path fields are not in my response dto or exceptionHandler. the endpoint in the instances works correctly and returns the second response when deployed initially but some time later the first response starts to return in an unexpected way then after restart the problem is resolved. Why?

Likewise Internal Server Error is not involved codebase or in any bundle.

{
  "timestamp":"2023-07-18T11:30:06+03:00",
  "status":500,
  "error":"Internal Server Error",
  "message":"***",
  "path":"/rest/**/save"
} 

expected response fields are below:

{
    "status": "FAIL",
    "message": "***",
    "errorCode": "**",
    "availableToRetry": false
}

Where does the response come from?

Debugged the exception Handler but it seems normal.

Upvotes: 0

Views: 119

Answers (0)

Related Questions