PackagesCanonicalsLogsProblems
    Packages
    uk.nhsdigital.r4@2.5.0
    https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode
{
  "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-06T00: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.5.0",
  "status": "draft",
  "id": "cb02dab6-2f75-4a81-a1a1-5f36bececdda",
  "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"
  }, {
    "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. Recommend using HTTP Status Code 403"
  }, {
    "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. Recommend using HTTP Status Code 401"
  }, {
    "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'. Recommend using HTTP Status Code 401"
  }, {
    "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'. Recommend using HTTP Status Code 400"
  }, {
    "code": "TIMEOUT",
    "display": "Request has timed out",
    "definition": "The request has not responded in the timeout period, retry the request. Recommend using HTTP Status Code 408"
  }, {
    "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. Recommend using HTTP Status Code 429"
  }, {
    "code": "METHOD_NOT_ALLOWED",
    "display": "Method not allowed",
    "definition": "The request method (verb) is not permitted on this endpoint. Recommend using HTTP Status Code 405"
  }, {
    "code": "SERVICE_UNAVAILABLE",
    "display": "Service unavailable - 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. Normally maps to HTTP Status Code 503"
  }, {
    "code": "SERVICE_ERROR",
    "display": "Service failure or unexpected error",
    "definition": "There has been server or service problem and it could be limited to this one request. Re-send the request after a short period of time. Normally maps to HTTP Status Code 500"
  }, {
    "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. Recommend using HTTP Status Code 404"
  }, {
    "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. Recommend using HTTP Status Code 400"
  }, {
    "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. Recommend using HTTP Status Code 400"
  }, {
    "code": "MISSING_VALUE",
    "display": "A required value is missing",
    "definition": "Inform the caller which value is missing value in the request. Recommend using HTTP Status Code 400"
  }, {
    "code": "NOT_ACCEPTABLE",
    "display": "Compatible content was not available",
    "definition": "The request content string did not result in a matching content type that could be returned. If an API version was requested and it is invalid the message should make that clear. Recommend using HTTP Status Code 406"
  } ],
  "caseSensitive": false,
  "version": "0.3.0",
  "contact": [ {
    "name": "Interoperability Team",
    "telecom": [ {
      "use": "work",
      "value": "interoperabilityteam@nhs.net",
      "system": "email"
    } ]
  } ]
}