Error Handling

Health Gorilla’s APIs use standard HTTP status codes combined with the FHIR OperationOutcome resource to report errors in a structured and consistent way. This allows developers to programmatically detect, log, and handle failure conditions across all API requests.

Error responses are returned in application/fhir+json format for FHIR R4 and STU3 environments, including detailed diagnostics when available. Most common error scenarios include validation failures, authentication errors, insufficient scope, and resource conflicts.

This guide includes:

  • HTTP status codes and how to interpret them
  • The FHIR OperationOutcome format used in structured error responses
  • Common API error scenarios and how to resolve them
  • Troubleshooting techniques for failed requests