Skip to content

Commit a45f653

Browse files
authored
Merge pull request #202 from NHSDigital/dev/NPA-4913_502_Error
NPA-4913 Add 502 Errors
2 parents 96a88a3 + 2d92d49 commit a45f653

File tree

1 file changed

+30
-5
lines changed

1 file changed

+30
-5
lines changed

specification/validated-relationships-service-api.yaml

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,15 @@ paths:
237237
examples:
238238
accessDeniedError:
239239
$ref: "./examples/responses/errors/access-denied.yaml#/AccessDeniedError"
240-
"500":
241-
description: Internal server error
240+
"5XX":
241+
description: |
242+
Errors will be returned for the first error encountered in the request. An error occurred as follows:
243+
244+
| HTTP status | Error code | Description |
245+
| ----------- | -------------------------- | ------------------------------------------------------------ |
246+
| 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. |
247+
| 502 | `GATEWAY_ERROR` | Connection to the backend service failed. |
248+
242249
content:
243250
application/fhir+json:
244251
schema:
@@ -317,7 +324,14 @@ paths:
317324
referenceCodeNotFound:
318325
$ref: "./examples/responses/GET_QuestionnaireResponse/errors/questionnaire_response_not_found.yaml#/QuestionnaireResponseNotFound"
319326
"5XX":
320-
description: Server error
327+
description: |
328+
Errors will be returned for the first error encountered in the request. An error occurred as follows:
329+
330+
| HTTP status | Error code | Description |
331+
| ----------- | -------------------------- | ------------------------------------------------------------ |
332+
| 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. |
333+
| 502 | `GATEWAY_ERROR` | Connection to the backend service failed. |
334+
321335
content:
322336
application/fhir+json:
323337
schema:
@@ -420,8 +434,15 @@ paths:
420434
RelatedPersonInvalidIdentifierError:
421435
$ref: "./examples/responses/GET_RelatedPerson/errors/invalid-identifier.yaml#/RelatedPersonInvalidIdentifierError"
422436

423-
"500":
424-
description: Internal server error
437+
"5XX":
438+
description: |
439+
Errors will be returned for the first error encountered in the request. An error occurred as follows:
440+
441+
| HTTP status | Error code | Description |
442+
| ----------- | -------------------------- | ------------------------------------------------------------ |
443+
| 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. |
444+
| 502 | `GATEWAY_ERROR` | Connection to the backend service failed. |
445+
425446
content:
426447
application/fhir+json:
427448
schema:
@@ -570,6 +591,7 @@ paths:
570591
| HTTP status | Error code | Description |
571592
| ----------- | -------------------------- | ------------------------------------------------------------ |
572593
| 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. |
594+
| 502 | `GATEWAY_ERROR` | Connection to the backend service failed. |
573595
| 503 | `DOWNSTREAM_SERVICE_ERROR` | A downsteam service has failed, request cannot be completed. |
574596
575597
content:
@@ -689,6 +711,7 @@ paths:
689711
| HTTP status | Error code | Description |
690712
| ----------- | -------------------------- | ------------------------------------------------------------ |
691713
| 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. |
714+
| 502 | `GATEWAY_ERROR` | Connection to the backend service failed. |
692715
| 503 | `DOWNSTREAM_SERVICE_ERROR` | A downsteam service has failed, request cannot be completed. |
693716
694717
content:
@@ -846,7 +869,9 @@ paths:
846869
| HTTP status | Error code | Description |
847870
| ----------- | -------------------------- | ------------------------------------------------------------ |
848871
| 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. |
872+
| 502 | `GATEWAY_ERROR` | Connection to the backend service failed. |
849873
| 503 | `DOWNSTREAM_SERVICE_ERROR` | A downsteam service has failed, request cannot be completed. |
874+
850875
content:
851876
application/fhir+json:
852877
schema:

0 commit comments

Comments
 (0)