{ "description": "A CodeSystem that identifies generic API error or warning codes in response to a request. The list is not exhaustive and many APIs will have an additional set of codes specific to their business logic and implementation. For publishers of APIs, we recommend that you use the code and display values in your API to make it more readable.", "_filename": "NHSD-API-ErrorOrWarningCode.json", "package_name": "uk.nhsdigital.r4", "date": "2022-04-05T00:00:00+00:00", "publisher": "NHS Digital", "content": "complete", "name": "nhsdapierrororwarningcode", "copyright": "Copyright © 2022 NHS Digital", "type": null, "experimental": null, "resourceType": "CodeSystem", "title": null, "package_version": "2.4.7", "status": "draft", "id": "73caa7f8-e082-4e68-85dd-48fd50a47c95", "kind": null, "url": "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", "concept": [ { "code": "ACCESS_DENIED", "display": "Access has been denied to process this request", "definition": "Although authenticated - the system or user does not have permission for a particular request. Recommend using [HTTP Status Code 403](https://simplifier.net/nhsdigitalspine/issuedtype-to-http-status-code)" }, { "code": "ACCESS_DENIED_LEVEL", "display": "Access has been denied because you need higher level permissions", "definition": "The request requires higher pemission levels than the authentication provided. For example NHS login has three main levels of P0, P5 and P9 - and the request held a P0 level, instead of P9" }, { "code": "ACCESS_TOKEN_EXPIRED", "display": "Access token has expired", "definition": "Obtain a new access token - the provided access token has expired and is no longer valid, access tokens only have a short life time" }, { "code": "ACCESS_TOKEN_INVALID", "display": "Authorization header not formatted correctly", "definition": "The bearer token could not be retrieved from the Authorization header, format should be 'Bearer INSERT-ACCESS-TOKEN'" }, { "code": "ACCESS_TOKEN_MISSING", "display": "Authorization header not sent", "definition": "The access token must be passed in the Authorization header. The format should be 'Bearer INSERT-ACCESS-TOKEN'" }, { "code": "TIMEOUT", "display": "Request has timed out", "definition": "The request has not responded in the timeout period, retry the request" }, { "code": "TOO_MANY_REQUESTS", "display": "Your connection has exceeded the rate limit", "definition": "APIs have different rate limits - and your request has been rejected. Rate limits can be per application (connection) or per API. A detailed reason will be returned in the diagnoistics field. Wait a short period and re-try, ideally with an exponential back-off policy." }, { "code": "SERVICE_UNAVAILABLE", "display": "Service failure - could be temporary", "definition": "There has been a processing failure in the request chain. This could be tranisent failure for a single request, a temporary service issue or maintenance window. Re-send the request after the time specified in the Retry-After header." }, { "code": "METHOD_NOT_ALLOWED", "display": "Method not allowed", "definition": "The request method (verb) is not permitted on this endpoint." }, { "code": "RESOURCE_NOT_FOUND", "display": "Resource not found", "definition": "The URL did not point to an existing resource. This could be a simple incorrect url path, or for some REST APIs this can equate to a person or prescription not existing in that API." }, { "code": "NHS_NUMBER_INVALID", "display": "NHS Number pass does not exist", "definition": "NHS Number is intrinsic to many APIs, returning this means that the passed in NHS number is invalid or does not exist" }, { "code": "INVALID_SEARCH_DATA", "display": "Invalid search data", "definition": "The search parameters are invalid. A description of what exactly is at fault will be added to the display." }, { "code": "MISSING_HEADER", "display": "A required header is missing", "definition": "Inform the caller which required header is missing in the request. Some APIs will return a list of missing headers, others will return the first one. If a list is returned, there will be one issue per error." }, { "code": "VALIDATION_ERROR", "display": "A paremeter or value has resulted in a validation error", "definition": "Returns which parameter or value was incorrect, and why. Some APIs will return a list of errors, others will return the first one. If a list is returned, there will be one issue per error." }, { "code": "MISSING_VALUE", "display": "A required value is missing", "definition": "Inform the caller which value is missing value in the request." } ], "caseSensitive": false, "version": "0.2.0", "contact": [ { "name": "Interoperability Team", "telecom": [ { "use": "work", "value": "interoperabilityteam@nhs.net", "system": "email" } ] } ] }