-
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.
[NRL-602] Make apigee error responses into valid OperationOutcomes
- Loading branch information
1 parent
c10c128
commit 4968ed2
Showing
15 changed files
with
146 additions
and
88 deletions.
There are no files selected for viewing
17 changes: 8 additions & 9 deletions
17
proxies/live/apiproxy/policies/AssignMessage.Errors.CatchAllMessage.xml
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
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
10 changes: 0 additions & 10 deletions
10
proxies/live/apiproxy/policies/RaiseFault.400BadRequest.xml
This file was deleted.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
proxies/live/apiproxy/policies/RaiseFault.400MissingODSHeader.xml
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,26 @@ | ||
<RaiseFault async="false" continueOnError="false" enabled="true" name="RaiseFault.400MissingODSHeader"> | ||
<FaultResponse> | ||
<Set> | ||
<Payload contentType="text/plain"> | ||
{ | ||
"resourceType": "OperationOutcome", | ||
"issue": [ { | ||
"severity": "error", | ||
"code": "required", | ||
"details": { | ||
"coding": [ { | ||
"system": "https://fhir.nhs.uk/spine-error-or-warning-code-1", | ||
"code": "MISSING_OR_INVALID_HEADER", | ||
"display": "There is a required header missing or invalid" | ||
} ] | ||
}, | ||
"diagnostics": "The NHSD-End-User-Organisation-ODS header is missing or invalid" | ||
} ] | ||
} | ||
</Payload> | ||
<StatusCode>400</StatusCode> | ||
<ReasonPhrase>Bad Request</ReasonPhrase> | ||
</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
35 changes: 17 additions & 18 deletions
35
proxies/live/apiproxy/policies/RaiseFault.403NoPointers.xml
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
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
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
17 changes: 8 additions & 9 deletions
17
proxies/sandbox/apiproxy/policies/AssignMessage.Errors.CatchAllMessage.xml
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
10 changes: 0 additions & 10 deletions
10
proxies/sandbox/apiproxy/policies/RaiseFault.400BadRequest.xml
This file was deleted.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
proxies/sandbox/apiproxy/policies/RaiseFault.400MissingODSHeader.xml
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,26 @@ | ||
<RaiseFault async="false" continueOnError="false" enabled="true" name="RaiseFault.400MissingODSHeader"> | ||
<FaultResponse> | ||
<Set> | ||
<Payload contentType="text/plain"> | ||
{ | ||
"resourceType": "OperationOutcome", | ||
"issue": [ { | ||
"severity": "error", | ||
"code": "required", | ||
"details": { | ||
"coding": [ { | ||
"system": "https://fhir.nhs.uk/spine-error-or-warning-code-1", | ||
"code": "MISSING_OR_INVALID_HEADER", | ||
"display": "There is a required header missing or invalid" | ||
} ] | ||
}, | ||
"diagnostics": "The NHSD-End-User-Organisation-ODS header is missing or invalid" | ||
} ] | ||
} | ||
</Payload> | ||
<StatusCode>400</StatusCode> | ||
<ReasonPhrase>Bad Request</ReasonPhrase> | ||
</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
35 changes: 17 additions & 18 deletions
35
proxies/sandbox/apiproxy/policies/RaiseFault.403NoPointers.xml
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
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
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