I have my c# method , In the same I throwing exception in one of my case like below
throw new Exception("My Message");
And I am calling same endpoint from typescript , How can I get same message in typescript
When I am catching the exception in typescript like below code , I am not getting same message which is thrown in c#.
It is givingme standard internal server error .
catch(error => {
alert(error.response.data)
alert(error)