We recently upgraded our private cloud version from 4.15.07 to 4.16.09 and are running in to an interesting situation with the RaiseFault policy. Please see the policy in question below.
In the old version when the policy executes, the status code returned is 422 as expected. However the same proxy with the policy in the new version returns a status code of 424. If I change the status code to 400, I get the response code as 400. Is there any internal mapping of status codes for certain ranges?
I also tried a similar policy implementation in public cloud and the status code is returned as expected.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<RaiseFault async="false" continueOnError="false" enabled="true" name="Validate-Query-Parameter">
<DisplayName>Validate Query Parameter</DisplayName>
<Properties/>
<FaultResponse>
<Set>
<Headers/>
<Payload contentType="application/json">\{"code": 422, "message": "Email address is required"}</Payload>
<StatusCode>422</StatusCode>
<ReasonPhrase>Email address is required.</ReasonPhrase>
</Set>
</FaultResponse>
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
</RaiseFault>