SDK
Error Handling
Handle errors and rate limits with the SDK
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Handle errors and rate limits with the SDK
import {
EmitKitError,
RateLimitError,
ValidationError
} from '@emitkit/js';
try {
await client.events.create({...});
} catch (error) {
if (error instanceof RateLimitError) {
console.log(`Retry in ${error.rateLimit.resetIn}ms`);
} else if (error instanceof ValidationError) {
console.log('Validation errors:', error.validationErrors);
}
}