Skip to content

Error Handling

Benmebrouk edited this page Apr 12, 2026 · 1 revision

Error Handling

import { ServerError, ValidationError, ConnectionError, TimeoutError } from 'wauldo';

try {
  await client.guard('test', 'test');
} catch (e) {
  if (e instanceof ServerError) console.error(`[${e.code}]: ${e.message}`);
}
Code Meaning
400 Bad request
401 Unauthorized
429 Rate limited
500 Server error

The SDK retries transient errors with exponential backoff.

Clone this wiki locally