-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from NHSDigital/NPA-2273_Add_404_Response
NPA-2273 Add 404 Not Found Response
- Loading branch information
Showing
4 changed files
with
49 additions
and
47 deletions.
There are no files selected for viewing
28 changes: 0 additions & 28 deletions
28
proxies/live/apiproxy/policies/AssignMessage.OAuthPolicyErrorResponse.xml
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
proxies/live/apiproxy/policies/ExtractVariables.OAuthErrorFaultString.xml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<!-- | ||
This policy raises a 404 error response for an invalid resource request. | ||
Raisefault policies stop the execution of the current flow and move to the error flow, which returns the error response defined here to the requesting application. | ||
For more information on RaiseFault policies within Apigee see the following resource: | ||
* https://docs.apigee.com/api-platform/reference/policies/raise-fault-policy | ||
--> | ||
<RaiseFault async="false" continueOnError="false" enabled="true" name="RaiseFault.404NotFound"> | ||
<DisplayName>RaiseFault.404NotFound</DisplayName> | ||
<Properties/> | ||
<FaultResponse> | ||
<Set> | ||
<Headers/> | ||
<StatusCode>404</StatusCode> | ||
<ReasonPhrase>NotFound</ReasonPhrase> | ||
<Payload> | ||
{ | ||
"issue": [ | ||
{ | ||
"code": "processing", | ||
"details": { | ||
"coding": [ | ||
{ | ||
"code": "INVALIDATED_RESOURCE", | ||
"display": "Resource that has been marked as invalid was requested - invalid resources cannot be retrieved", | ||
"system": "https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode", | ||
"version": "1" | ||
} | ||
] | ||
}, | ||
"severity": "error" | ||
} | ||
], | ||
"resourceType": "OperationOutcome" | ||
} | ||
</Payload> | ||
</Set> | ||
</FaultResponse> | ||
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables> | ||
</RaiseFault> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters