> ## Documentation Index
> Fetch the complete documentation index at: https://docs.emitkit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Error Handling

> Handle errors and rate limits with the SDK

## Error Types

The SDK provides type-safe error classes:

```typescript theme={null}
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);
  }
}
```

See [TypeScript SDK](/sdk/typescript) for complete documentation.
