Skip to main content

Error Codes

All error responses return JSON:

{
"error": "session_expired",
"message": "Your session has expired. Please relaunch the application.",
"status": 401
}

Client errors (4xx)

CodeHTTPWhenRemediation
session_not_found401No SmartLaunchContext in sessionRedirect to /launch
session_expired401Access token expired and refresh failedRedirect to /launch
insufficient_scope403Required SMART scope not grantedRequest additional scopes
patient_not_found404FHIR Patient resource does not existCheck patient ID
fhir_error502Epic FHIR returned an errorSee details field for FHIR OperationOutcome

Launch errors (redirect parameters)

Errors during the SMART launch redirect to /launch?error=...:

ErrorWhen
discovery_failedCould not fetch /.well-known/smart-configuration
invalid_stateCSRF state mismatch on callback
token_exchange_failedEpic rejected the authorization code
oidc_validation_failedid_token validation failed
session_expiredRefresh token expired — full re-launch needed

Endpoints