Artemise
Docs
Sign in
SDK

Errors & retries

Typed error classes, what each status means, and automatic retries.

Every failed request throws a subclass of ArtemiseError carrying .status and .requestId (quote the request id when contacting support).

Error classes

  • AuthenticationError — 401. Missing, malformed, or revoked key.
  • PermissionError — 402 or 403. No active subscription, or a spend budget (daily AI budget) is exhausted.
  • NotFoundError — 404. The resource doesn't exist in your workspace.
  • RateLimitError — 429. A quota (e.g. monthly enrichments) is used up.
  • ArtemiseError — anything else (400 validation, 5xx).

Retries

429 and 5xx responses (and network failures) are retried automatically with exponential backoff — maxRetries defaults to 2:

const client = new Artemise({ apiKey, maxRetries: 4 });

Auth and validation errors are never retried.

import Artemise, { RateLimitError } from '@artemise/sdk';

try {
  await client.contacts.enrich({ company: 'Acme', role: 'CTO' });
} catch (err) {
  if (err instanceof RateLimitError) {
    // monthly enrichment quota exhausted — resets on the 1st (UTC)
  } else throw err;
}
UsageSignals