I’m using jqgrid in a project.
And need to know how to return/set error responses on the webserver to allow custom messages.
On my local instance i get the following result.

But on the deployed site on our webserver the messages get suppressed and replaced with the default message.

It’s worth a mention that i return the error/failed result by setting the response status code to 500, and setting the description to my custom message.
(is there perhaps a better way to do this)
Also ive added/modified the following config values.
<customErrors mode="On" />
<system.webServer>
<httpErrors errorMode="Custom" >
<remove statusCode="500" />
</httpErrors>
</system.webServer>
Does anyone know what im doing wrong? Or how to get it working 😛
I found a solution. Before i updated my web.config to
It was set to (which explains why I experienced the issue in the first place, as I was accessing the site from a remote source)
Changing it to the following
and implementing Muhammad Mudassir suggestion, seemed to do the trick.