Skip to main content

Errors

ClinikAPI uses standard HTTP status codes and returns structured error responses.

Error Response Format

HTTP Status Codes

Error Codes

SDK Error Handling

The SDK throws typed errors that you can catch:

Automatic Retries

The SDK automatically retries on 5xx errors and 429 (rate limit) responses with jittered exponential backoff:
  • Default: 2 retries
  • Backoff: random jitter up to min(1000 * 2^attempt, 10000) ms
  • Configurable via retries option:

Rate Limits

Rate limits are plan-based and returned in response headers: The SDK exposes these in meta:

PHI Sanitization

Error responses never contain Protected Health Information (PHI). Field values are stripped from validation error messages — only field names and constraint descriptions are included.