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

# Exception Handling

> Comprehensive guide to SDK exceptions and error handling

## Overview

The RecallrAI SDK implements a consistent exception hierarchy to help you handle errors gracefully. All SDK exceptions inherit from `RecallrAIError`.

## Importing Exceptions

```typescript theme={null}
import {
  RecallrAIError,
  AuthenticationError,
  TimeoutError,
  ConnectionError,
  InternalServerError,
  RateLimitError,
  UserNotFoundError,
  UserAlreadyExistsError,
  SessionNotFoundError,
  InvalidSessionStateError,
  MergeConflictNotFoundError,
} from "recallrai";
```

## Base Exception

```typescript theme={null}
try {
  await client.getUser("user123");
} catch (error) {
  if (error instanceof RecallrAIError) {
    console.log(`RecallrAI error: ${error.message}`);
  }
}
```

## Common Errors

* `AuthenticationError`: Invalid API key or project ID
* `TimeoutError`: Request timed out
* `ConnectionError`: Network connectivity issues
* `InternalServerError`: API returned a 5xx error
* `RateLimitError`: Too many requests
* `UserNotFoundError`: User does not exist
* `SessionNotFoundError`: Session does not exist
* `InvalidSessionStateError`: Invalid session status for operation
* `MergeConflictNotFoundError`: Merge conflict was not found
