Handling Errors

When a request encounters an error, the software will indicate the problem via standard HTTP status code. Common errors are described below.

Invalid Parameters

Status 400 (Bad Request) will result if you provide invalid search parameters or data to a request.

Unauthorized Access

If there is a problem with the access token in the request, the software will respond with status 401 (Unauthorized).

{"Message":"You are not authorized to access this resource."}

System Errors

If a general error occurs while processing the request, the software will respond with status 500 (Internal Server Error). The response will include an OperationOutcome Resource with further details about the error. For example, the following error reports a problem with term mapping:

<OperationOutcome xmlns="http://hl7.org/fhir">
    <text>
        <status value="generated" />
        <div xmlns="http://www.w3.org/1999/xhtml">Unable to map the term CareEvolution.OrderStatus.RE to a FHIR DiagnosticOrderStatus code: there is no valid term mapping and the term code does not correspond to any of the allowed values</div>
    </text>
    <issue>
        <severity value="error" />
        <details>
            <text value="Unable to map the term CareEvolution.OrderStatus.RE to a FHIR DiagnosticOrderStatus code: there is no valid term mapping and the term code does not correspond to any of the allowed values" />
        </details>
    </issue>
</OperationOutcome>

The ‘details’ field gives human-readable text describing the error, to assist in troubleshooting.