Skip to content

Commit 5d89a29

Browse files
committed
NPA-4986: Fix incorrect error codes and improve spec
1 parent 4356a62 commit 5d89a29

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

specification/validated-relationships-service-api.yaml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,16 @@ info:
119119
## Open source
120120
You might find the following [open source](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#open-source) resources useful:
121121
122-
| Resource | Description | Links |
123-
|---------------------------|----------------------------------------------------------------------|--------------------------------------------------------------------------------|
124-
| Validated Relationships FHIR API | Source code for the API proxy, sandbox and specification. | [GitHub repo](https://github.com/NHSDigital/validated-relationships-service-api) |
125-
| FHIR libraries and SDKs | Various open source libraries for integrating with FHIR APIs. | [FHIR libraries and SDKs](https://digital.nhs.uk/developer/guides-and-documentation/api-technologies-at-nhs-digital#fhir-libraries-and-sdks) |
126-
| nhs-number | Python package containing utilities for NHS numbers including validity checks, normalisation and generation. | [GitHub repo](https://github.com/uk-fci/nhs-number) \| [Python Package index](https://pypi.org/project/nhs-number/) \| [Docs](https://nhs-number.uk-fci.tech/) |
122+
| Resource | Description | Links |
123+
| -------------------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
124+
| Validated Relationships FHIR API | Source code for the API proxy, sandbox and specification. | [GitHub repo](https://github.com/NHSDigital/validated-relationships-service-api) |
125+
| FHIR libraries and SDKs | Various open source libraries for integrating with FHIR APIs. | [FHIR libraries and SDKs](https://digital.nhs.uk/developer/guides-and-documentation/api-technologies-at-nhs-digital#fhir-libraries-and-sdks) |
126+
| nhs-number | Python package containing utilities for NHS numbers including validity checks, normalisation and generation. | [GitHub repo](https://github.com/uk-fci/nhs-number) \| [Python Package index](https://pypi.org/project/nhs-number/) \| [Docs](https://nhs-number.uk-fci.tech/) |
127127
128128
We currently don't have any open source client libraries or sample code for this API and the source code for the PDS FHIR back end (the Core Spine source code) is not currently in the open. If you think this would be useful, [contact us](https://digital.nhs.uk/developer/help-and-support).
129129
130130
## Environments and testing
131+
131132
| Environment | Base URL |
132133
| ----------------- | ------------------------------------------------------------------------------------ |
133134
| Sandbox | `https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/` |
@@ -246,8 +247,7 @@ paths:
246247
247248
| HTTP status | Error code | Description |
248249
| ----------- | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
249-
| 400 | `BAD_REQUEST` | Bad request. |
250-
| 400 | `NOT_SUPPORTED` | The request is not currently supported. |
250+
| 400 | `BAD_REQUEST` | Bad request. For details, see the `diagnostics` |
251251
| 401 | `ACCESS_DENIED` | Missing or invalid OAuth 2.0 bearer token in request. |
252252
| 403 | `FORBIDDEN` | Access denied to resource. |
253253
| 404 | `INVALIDATED_RESOURCE` | Resource that has been marked as invalid was requested - invalid resources cannot be retrieved |
@@ -270,7 +270,7 @@ paths:
270270
| HTTP status | Error code | Description |
271271
| ----------- | -------------------------- | ------------------------------------------------------------ |
272272
| 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. |
273-
| 502 | `GATEWAY_ERROR` | Connection to the backend service failed. |
273+
| 502 | `BAD_GATEWAY` | Connection to the backend service failed. |
274274
275275
content:
276276
application/fhir+json:
@@ -362,7 +362,7 @@ paths:
362362
| HTTP status | Error code | Description |
363363
| ----------- | -------------------------- | ------------------------------------------------------------ |
364364
| 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. |
365-
| 502 | `GATEWAY_ERROR` | Connection to the backend service failed. |
365+
| 502 | `BAD_GATEWAY` | Connection to the backend service failed. |
366366
367367
content:
368368
application/fhir+json:
@@ -485,7 +485,7 @@ paths:
485485
| HTTP status | Error code | Description |
486486
| ----------- | -------------------------- | ------------------------------------------------------------ |
487487
| 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. |
488-
| 502 | `GATEWAY_ERROR` | Connection to the backend service failed. |
488+
| 502 | `BAD_GATEWAY` | Connection to the backend service failed. |
489489
490490
content:
491491
application/fhir+json:
@@ -602,7 +602,6 @@ paths:
602602
| 400 | `MISSING_VALUE` | Missing header or parameter. For details, see the `diagnostics` field. |
603603
| 400 | `INVALID_VALUE` | Invalid header. For details, see the `diagnostics` field. |
604604
| 400 | `MISSING_IDENTIFIER_VALUE` | Missing performer:identifier or patient:identifier value. |
605-
| 400 | `NOT_SUPPORTED` | The request is not currently supported. |
606605
| 401 | `ACCESS_DENIED` | Missing or invalid OAuth 2.0 bearer token in request. |
607606
| 403 | `FORBIDDEN` | Access denied to resource. |
608607
| 404 | `INVALIDATED_RESOURCE` | Resource that has been marked as invalid was requested - invalid resources cannot be retrieved |
@@ -642,7 +641,7 @@ paths:
642641
| HTTP status | Error code | Description |
643642
| ----------- | -------------------------- | ------------------------------------------------------------ |
644643
| 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. |
645-
| 502 | `GATEWAY_ERROR` | Connection to the backend service failed. |
644+
| 502 | `BAD_GATEWAY` | Connection to the backend service failed. |
646645
| 503 | `DOWNSTREAM_SERVICE_ERROR` | A downsteam service has failed, request cannot be completed. |
647646
648647
content:
@@ -767,7 +766,7 @@ paths:
767766
| HTTP status | Error code | Description |
768767
| ----------- | -------------------------- | ------------------------------------------------------------ |
769768
| 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. |
770-
| 502 | `GATEWAY_ERROR` | Connection to the backend service failed. |
769+
| 502 | `BAD_GATEWAY` | Connection to the backend service failed. |
771770
| 503 | `DOWNSTREAM_SERVICE_ERROR` | A downsteam service has failed, request cannot be completed. |
772771
773772
content:
@@ -881,7 +880,7 @@ paths:
881880
| HTTP status | Error code | Description |
882881
| ----------- | -------------------------- | ------------------------------------------------------------ |
883882
| 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. |
884-
| 502 | `GATEWAY_ERROR` | Connection to the backend service failed. |
883+
| 502 | `BAD_GATEWAY` | Connection to the backend service failed. |
885884
| 503 | `DOWNSTREAM_SERVICE_ERROR` | A downsteam service has failed, request cannot be completed. |
886885
887886
content:
@@ -1028,7 +1027,7 @@ paths:
10281027
| HTTP status | Error code | Description |
10291028
| ----------- | -------------------------- | ------------------------------------------------------------ |
10301029
| 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. |
1031-
| 502 | `GATEWAY_ERROR` | Connection to the backend service failed. |
1030+
| 502 | `BAD_GATEWAY` | Connection to the backend service failed. |
10321031
| 503 | `DOWNSTREAM_SERVICE_ERROR` | A downsteam service has failed, request cannot be completed. |
10331032
10341033
content:

0 commit comments

Comments
 (0)