Error Response in API

Hi ,
I am facing the below response while sending the request.
“errorCode”: 500,
“userMessage”: “Index: 0, Size: 0”,
“stacktrace”: “”,
“remoteMessage”: null
I am passing the payload and input datas dynamically at the run time.
All inputs are correct on reports.
But in the response i am getting the above json instead of 200.
Can anyone help on this.


I am afraid you need to have a look in to the system that you send the request to.

Code 500 means internal server error, meaning the system you sent the request to it ran in to an exception. And either it is not implemented well or the system failed that hard it failed add any message in its response.

In short: You need to debug the system under test.


1 Like

Hi Surya,

As Markus (@Noordsestern) said, the server had an internal error, this could be:

  • you didn’t construct the request correctly
    • in this case you should compare your request to a working example request (e.g. poastman, curl etc). Make sure the request headers and body are all the same
    • The SUT should have better error handling and given you a better error as to what the issue is, so maybe raise a defect for that, and then look in the server logs to find out the issue with your request
  • If you sent everything correctly this could be a bug in the SUT, but from what you’ve told us we can’t know if that’s the case?