Raise fault policy returns unexpected status code

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>

raisefault-response-code.png

0 4 426
4 REPLIES 4

Yes, there's a known problem. We tracked it under ticket number APIRT-3356 .

Let me research it to see if we have a patch available for 16.09. What patch level are you using on 16.09, do you know?

@arghya das , has this fix been applied to OPDK 16.09 ?

We are currently running 4.16.09.02, is the .02 the patch level of the platform?

Yes. Let me check.

Hi Dino, were you able to confirm if a patch is available for this issue for on-prem installation?