Skip to main content

Exception hierarchy

All SDK errors extend ChatATPError, which carries:
  • statusCode — the HTTP status code (if applicable)
  • message — a human-readable description
  • payload — the raw API response body
  • requestId — the server request ID (when available)

Handling errors

Retries

The SDK automatically retries requests on transient failures (network errors, 500, 502, 503, 504, and 429) with exponential backoff. The default is 2 retries. You can adjust this:
Set maxRetries: 0 to disable retries entirely.