I have been trying to display different error messages for different faults. For this I have used multiple Raise_Fault policies. When I try to trace the proxy, the raise fault policies are getting called correctly but the error message which I have added in the payload tag is not getting displayed, only the error code is reflected correctly. Moreover for every error I get the same error script just the error code is different.
Below is the script that comes every time any of the fault policy is executed and just the error code gets changed . error message is not displayed
""{"fault":{"faultstring":"Execution of ServiceCallout RequestAccessToken failed. Reason: ResponseCode 400 is treated as error","detail":{"errorcode":"steps.servicecallout.ExecutionFailed"}}}""