Skip to Content
StoneDock Connect
StoneDock Connect
StoneDock Connect Documentation
Error ReferenceFAQSecurity Disclosure
Support

Error Reference

Every error code from the StoneDock Connect API, explained.

Error Response Format

Error bodies are flat — error is the stable, snake_case or UPPER_SNAKE string to branch your code on. Most endpoint-level validation errors use a lowercase error string with an optional message and/or endpoint-specific extra fields (details, allowed, missing); errors caught by the shared exception handler (FHIR-layer failures, not-found patients/practitioners) use an UPPER_SNAKE code field plus a correlationId you can reference in a support request:

{
  "error": "invalid_status",
  "allowed": ["draft", "active", "on-hold"]
}
{
  "code": "PATIENT_NOT_FOUND",
  "message": "The requested patient was not found or has not completed provisioning.",
  "correlationId": "c0ffee-1234"
}

Error Codes

Authentication Errors (401)

errorCauseResolution
missing_credentialsX-API-Key header absentInclude the header on every /partner/v1/* request
authentication_failedAPI key doesn't exist, was revoked, or doesn't match the environment (sandbox vs. production)Check your key in the Partner Portal

A missing, invalid, or expired X-Consent-Assertion also returns 401 on any /partner/v1/users/{id}/* endpoint — regenerate a fresh consent token (see Authentication).

Authorization Errors (403)

errorCauseResolution
partner_auth_requiredEndpoint requires partner authentication but no valid context was establishedConfirm your API key header is present and well-formed
insufficient_scopeYour partner application doesn't have the scope this endpoint requiresRequest the scope be granted to your application
scope_not_availableThe scope requested is reserved and not grantable yet (e.g. a Phase 3 sensitive-category scope)Contact partners@onepath.health

Consent revocation also surfaces as a 403 on endpoints gated by X-Consent-Assertion.

Not Found (404)

CodeCauseResolution
fhir_patient_not_found (varies by endpoint)No user with this externalId exists for your partner, or provisioning hasn't finishedVerify the id; call /onboard if new
PATIENT_NOT_FOUND / PRACTITIONER_NOT_FOUNDShared exception-handler equivalents for the same condition on some code pathsSame as above

Most resource-specific 404s follow the pattern {resource}_not_found (e.g. practitioner_not_provisioned, questionnaire_response_not_found) — check the endpoint's own docs in the API Reference for the exact string.

Conflict (409)

CauseResolution
externalId already onboarded/onboard is idempotent — re-calling it returns the existing user rather than erroring
version_conflictYou passed a stale expectedVersion/If-Match on a concurrent-edit-guarded resource (visit notes, medications)

Validation Errors (422)

Validation failures carry a details array of { field, issue } (or endpoint-specific shape) — check it rather than hardcoding field names, since the set of required fields can grow across API versions.

Rate Limit (429)

No response body — respect the Retry-After header (seconds) and the X-RateLimit-* headers. See Rate Limits.

Server Errors (5xx)

Safe to retry. Use exponential backoff.

Python SDK

Official Python client for StoneDock Connect.

FAQ

Frequently asked questions about StoneDock Connect.

On this page

Error Response FormatError CodesAuthentication Errors (401)Authorization Errors (403)Not Found (404)Conflict (409)Validation Errors (422)Rate Limit (429)Server Errors (5xx)