Operation Outcomes
An OperationOutcome may be returned to provide additional context to an error. The tables below describes common OperationOutcomes and their causes.
| HTTP Status | Cause | Severity | Code |
|---|---|---|---|
| 500 | Response is missing a required field | fatal | required |
| 422 | Body contained unsupported fields | error | business-rule |
| 422 | Body contained modifier extensions | error | extension |
| 422 | Body contained implicit rules | error | not-supported |
{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "required",
"location": [
"/f:AllergyIntolerance/f:status"
]
}
]
}
Client Errors
Below are the possible types of client errors on API calls that receive request bodies:
-
Failing to send a required query parameter will result in a 400 Bad Request response.
HTTP/1.1 400 Bad Request no supported search parameters provided
-
Requesting the secure endpoint (non-open) without valid credentials will result in a 401 Unauthorized response.
HTTP/1.1 401 Unauthorized
-
Requesting a resource which does not exist will result in a 404 Not Found response.
HTTP/1.1 404 Not Found
-
Requested a media type other than JSON will result in a 406 Not Acceptable response.
HTTP/1.1 406 Not Acceptable Content-Length: 0
Missing Fields
-
Missing fields required by HL7 profiles such US Core (R4) will result in a DataAbsentReason.
-
{ "coding": [ { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", "valueCode": "unknown" } ] } ] } -
Patient consumers requesting a resource with a status of entered-in-error may result in a DataAbsentReason.
{ "coding": [ { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", "valueCode": "masked" } ] } ] } -
Missing Coding or CodeableConcept fields with a required value set binding will result in a DataAbsentReason, though it may return a text component.
{ "coding": [ { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", "valueCode": "unknown" } ] } ], "text": "Auth (Verified)" }