VORIM
We use cookies

We use cookies to analyze site traffic and improve your experience. You can choose to accept all cookies or only essential ones. See our Privacy Policy.

Error handling

The VorimError shape, every error code the API returns, and which ones are worth a retry rather than a log line and a page to whoever is on call.

Error Handling

The SDK throws VorimError for all API errors with structured details.

import { VorimError } from '@vorim/sdk';

try {
  await vorim.check('invalid_agent_id', 'agent:read');
} catch (err) {
  if (err instanceof VorimError) {
    console.log(err.status);   // 404
    console.log(err.code);     // 'AGENT_NOT_FOUND'
    console.log(err.message);  // 'Agent not found'
    console.log(err.details);  // { agent_id: 'invalid_agent_id' }
  }
}
typescript

Common error codes:

StatusCodeDescription
400VALIDATION_ERRORInvalid request body or parameters
401UNAUTHORIZEDMissing or invalid API key
403FORBIDDENInsufficient permissions
404AGENT_NOT_FOUNDResource not found (entity-specific: AGENT_NOT_FOUND, PERMISSION_NOT_FOUND, CONNECTION_NOT_FOUND, …)
409CONFLICTResource already exists
429RATE_LIMITEDToo many requests
500INTERNAL_ERRORServer error
Need Help?

Book a demo for a walkthrough, or contact us for support. For enterprise needs, reach out at sales@vorim.ai.