Skip to main content
import { Arga, ArgaAPIError } from 'arga-sdk';

const client = new Arga({ apiKey: 'arga_sk_...' });

try {
  await client.runs.get('nonexistent');
} catch (err) {
  if (err instanceof ArgaAPIError) {
    console.error(err.statusCode); // 404
    console.error(err.message);    // "Not found"
  }
}