ePMA Implementation Guidance for FHIR STU3

This guidance is under active development by NHS Digital and content may be added or updated on a regular basis.
Please note: This guidance has been superseded by the Implementation guide for digitial medicines, which contains up-to-date information.

Internal server errors

When the FHIR server has received a request for an operation or FHIR resource which is not (yet) implemented, then the NOT_IMPLEMENTED Spine error code MUST be used.

HTTP code Issue type Error code Error message
501 not-supported NOT_IMPLEMENTED FHIR resource or operation not implemented at server.

When the error is unexpected and the server can’t be more specific on the exact nature of the problem then the INTERNAL_SERVER_ERROR Spine error code MUST be used, and diagnostics MUST be included to provide detail of the error.

HTTP code Issue type Error code Error message
500 processing INTERNAL_SERVER_ERROR Unexpected internal server error.

Example: Unexpected exception

For example, if an unexpected internal exception is thrown by either an Operation or RESTful API, then the following error details would be returned:

{
    "resourceType": "OperationOutcome",
    "meta": {
        "profile": [
            "https://fhir.nhs.uk/STU3/StructureDefinition/Spine-OperationOutcome-1"
        ]
    },
    "issue": [
        {
            "severity": "error",
            "code": "exception",
            "details": {
                "coding": [
                    {
                        "system": "https://fhir.nhs.uk/STU3/ValueSet/Spine-ErrorOrWarningCode-1",
                        "code": "INTERNAL_SERVER_ERROR",
                        "display": "Internal server error"
                    }
                ]
            },
            "diagnostics": "Any further internal debug details i.e. stack trace details etc."
        }
  ]
}

back to top