Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions sandbox/src/mocks/r4/NHSDigital-OperationOutcome-503.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"resourceType": "OperationOutcome",
"meta": {
"lastUpdated": "2022-03-01T10:00:00.42Z"
},
"issue": [
{
"severity": "error",
"code": "transient",
"details": {
"coding": [
{
"system": "https://fhir.nhs.uk/CodeSystem/http-error-codes",
"code": "REC_UNAVAILABLE"
}
]
}
}
]
}

23 changes: 23 additions & 0 deletions sandbox/src/mocks/stu3/STU3-ServiceUnavailable.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"meta": {
"profile": [
"https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1"
]
},
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "transient",
"details": {
"coding": [
{
"system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1",
"code": "SYSTEM_UNAVAILABLE",
"display": "System Unavailable"
}
]
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,5 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,5 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,5 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,5 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,5 @@
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,5 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,6 @@ responses:
'429':
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
description: |
Defines a period (in seconds) after which the client should attempt their request again.
required: false
schema:
type: string
example: '120'
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
description: |
Where status code 503 (Service Unavailable) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.
In response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.

| issue.details.coding.code | issue.code | Coding System | Description |
| ------------------------- | ---------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |
| REC_UNAVAILABLE | transient | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |

headers:
X-Correlation-ID:
$ref: '../headers/response/CorrelationID.yaml'
X-Request-ID:
$ref: '../headers/response/RequestID.yaml'
Content-Type:
$ref: '../headers/response/ContentTypeFhirJson.yaml'
Retry-After:
$ref: '../headers/response/RetryAfter.yaml'
content:
application/fhir+json:
schema:
$ref: '../NHSDigital-OperationOutcome.yaml'
example:
$ref: '../../examples/NHSDigital-OperationOutcome-503.json'
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,5 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,5 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,5 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,5 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,5 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -180,3 +180,5 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,5 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,5 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,5 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,5 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,7 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
'504':
$ref: '../responses/rejectReferral/504Response.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,5 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ responses:
'500':
$ref: '../responses/InternalServerError.yaml'
'502':
$ref: '../responses/bookOrDeferAppointment/502Response.yaml'
$ref: '../responses/bookOrDeferAppointment/502Response.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
'504':
$ref: '../responses/bookOrDeferAppointment/504Response.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,5 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,5 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,5 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,5 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,5 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,5 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,5 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,5 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,5 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,5 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,5 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,5 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,5 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,5 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,7 @@ responses:
$ref: '../responses/InternalServerError.yaml'
'502':
$ref: '../responses/updateAppointment/502Response.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
'504':
$ref: '../responses/updateAppointment/504Response.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -163,5 +163,7 @@ responses:
$ref: '../responses/InternalServerError.yaml'
'502':
$ref: '../responses/cancelReferral/502Response.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
'504':
$ref: '../responses/cancelReferral/504Response.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,5 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,5 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,5 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,5 @@ responses:
$ref: '../responses/TooManyRequests.yaml'
'500':
$ref: '../responses/InternalServerError.yaml'
'503':
$ref: '../responses/ServiceUnavailable.yaml'
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
description: |
Defines a period (in seconds) after which the client should attempt their request again.
required: false
schema:
type: string
example: '120'
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
description: |
Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.
In response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.

| Error code | Description |
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |

headers:
X-Correlation-ID:
$ref: '../headers/response/CorrelationID.yaml'
X-Request-ID:
$ref: '../headers/response/RequestID.yaml'
Content-Type:
$ref: '../headers/response/ContentTypeFhirJson.yaml'
Retry-After:
$ref: '../headers/response/RetryAfter.yaml'
content:
application/fhir+json:
schema:
$ref: '../STU3-OperationOutcome.yaml'
example:
$ref: '../../examples/STU3-ServiceUnavailable.json'
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
description: |
Where status code 504 (Gateway Timeout) is returned then an eRS-OperationOutcome-1 will be included in the body.
Check diagnostics property for specific information regarding the error.
In response to receiving this status code, it is recommended that clients retry at a later time.

| Error code | Description |
| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
description: |
Where status code 504 (Gateway Timeout) is returned then an eRS-OperationOutcome-1 will be included in the body.
Check diagnostics property for specific information regarding the error.
In response to receiving this status code, it is recommended that clients retry at a later time.

| Error code | Description |
| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
description: |
Where status code 504 (Gateway Timeout) is returned then an eRS-OperationOutcome-1 will be included in the body.
Check diagnostics property for specific information regarding the error.
In response to receiving this status code, it is recommended that clients retry at a later time.

| Error code | Description |
| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
description: |
Where status code 504 (Gateway Timeout) is returned then an eRS-OperationOutcome-1 will be included in the body.
Check diagnostics property for specific information regarding the error.
In response to receiving this status code, it is recommended that clients retry at a later time.

| Error code | Description |
| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
Expand Down