Skip to content

Guides

Errors, limits and retries

Error bodies, rate limits, paging and how to retry safely.

Error bodies

Both APIs answer errors with the same small JSON body:

{"error": "not_found", "message": "..."}
Status SunCharts EHR Connect
400 invalid bad_request
401 unauthorized unauthorized
403 forbidden forbidden
404 not_found not_found
409 conflict conflict
428 version_required EHR link required
429 Public intake pages only rate_limited
503 unavailable: nothing changed, safe to retry Retry reads only

FHIR routes on the EHR answer with an OperationOutcome instead. OAuth endpoints use the standard OAuth error codes.

Rate limits

  • SunCharts EHR. There is no general API rate limit and there are no rate-limit headers. The public intake and booking pages have their own limits.
  • Connect. 600 requests a minute per app by default, shared by its tokens and keys. The token endpoint allows 30 requests a minute per address. Over the limit you receive 429 with Retry-After. There are no X-RateLimit headers.

Retrying safely

  • Neither API has an Idempotency-Key request header.
  • SunCharts EHR. Creates take a request_id in the body. Sending the same id again is safe; the same id with different content returns 409. Updates need If-Match with the version you read. Do not retry a write blindly.
  • Connect. Wait for Retry-After on 429. Retry 502, 503 and 504 only for GET, PUT and DELETE, with backoff, at most three times. Do not replay sign-in POST calls.

Paging

  • EHR FHIR searches: _count and the Bundle's next link.
  • EHR change notices: after and next_cursor.
  • Other EHR lists are bounded and say when there is more. Do not treat one page as the whole chart.