how to escape the double quotes in the error message thrown by the JS in assign message policy

I have a assign message policy in my faultRule which captures the error thrown from JS. Is there a way to remove the double quotes that come as a part of error message raised by JS in assign message?

0 1 228
1 REPLY 1

Not applicable

Hello @maivizhi,

Can you please let me know what is the error thrown and where you are facing the issue ? Can you please elaborate a little bit more ?

Still, if I understood it correctly, you can get rid of the unwanted chars in the JS itself, before raising it. You may use the following:

var addtionalChar = {Unwanted char};

var reg = new RegExp(addtionalChar, 'g');

ErrorName = ErrorName.replace(reg, '');

Hope that helps.