Skip to content

Commit

Permalink
[NRL-602] Check error.content in catch-all errors for errors from apigee
Browse files Browse the repository at this point in the history
  • Loading branch information
mattdean3-nhs committed Apr 17, 2024
1 parent c10c128 commit f3865fe
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
33 changes: 17 additions & 16 deletions proxies/live/apiproxy/policies/RaiseFault.403NoPointers.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
<RaiseFault async="false" continueOnError="false" enabled="true" name="RaiseFault.403NoPointers">
<FaultResponse>
<Set>
<Payload contentType="application/json"> {
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "403",
"details": {
"coding": [
<Payload contentType="application/json"> {
"resourceType": "OperationOutcome",
"issue": [
{
"code": "403",
"display": "Forbidden"
"severity": "error",
"code": "403",
"details": {
"coding": [
{
"code": "403",
"display": "Forbidden"
}
]
},
"diagnostics": "Provided ODS code has no pointers within requesting app"
}
]
},
"diagnostics": "Provided ODS code has no pointers within requesting app"
}
]
}</Payload>
]
}
</Payload>
<StatusCode>403</StatusCode>
<ReasonPhrase>Forbidden</ReasonPhrase>
</Set>
Expand Down
2 changes: 1 addition & 1 deletion proxies/live/apiproxy/proxies/default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
</Step>
<Step>
<Name>AssignMessage.Errors.CatchAllMessage</Name>
<Condition>(response.content NOT Like "*OperationOutcome*")</Condition>
<Condition>(response.content NOT Like "*OperationOutcome*") and (error.content NOT Like "*OperationOutcome*")</Condition>
</Step>
</DefaultFaultRule>
</ProxyEndpoint>

0 comments on commit f3865fe

Please sign in to comment.