Skip to main content

npm SDK: Error Handling

Most SDK calls are just regular async functions, so wrap them in try/catch. HTTP failures from the API client are reported as ArtosAPIError; validation and lower-level streaming failures may be ordinary Error instances.

A basic pattern

Common status codes

Retrying transient failures

For transient failures, implement retry logic with exponential backoff:

Support

For technical assistance or questions: When contacting support, please include:
  • Your organization ID
  • The SDK version (npm list @artosai/sdk)
  • Error messages and stack traces
  • Steps to reproduce the issue