Hi, Currently i am getting below response if any javaScript Error occured in my proxy. I want to remove/Customize this response message.
{"fault":{"faultstring":"Execution of target-ca-response failed with error: Javascript runtime error: \"ReferenceError: \"logger\" is not defined. (target_ca_response_js#47). at line 47 \"","detail":{"errorcode":"steps.javascript.ScriptExecutionFailed"}}}
No policy seems working after getting this error. i also tried to put my policy under <FaultRules> tag. but that also didn't work for me.
Suggest me a solution.
Details:
Applied in proxy end point:
<FaultRules> <FaultRule name="invalid_key_rule"> <Step> <Name>Error500</Name> <Condition>(message.status.code = 500)</Condition> </Step> </FaultRule> </FaultRules>
Error500 railsefault policy
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <RaiseFault async="false" continueOnError="false" enabled="true" name="Error500"> <DisplayName>Error500</DisplayName> <FaultRules/> <Properties/> <FaultResponse> <Set> <StatusCode>500</StatusCode> <ReasonPhrase>Server Error</ReasonPhrase> <Payload contentType="text/plain">Error Occured</Payload> </Set> <Remove> {message.content} {error.content} {error} <Payload contentType="application/json">{request.content}</Payload> <Payload contentType="application/json"></Payload> <Payload contentType="application/json">{message.content}</Payload> <Payload contentType="application/json">{error.content}</Payload> </Remove> </FaultResponse> <IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables> </RaiseFault>