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

# Error handling

> The TypeScript SDK provides specific error types to help you handle different scenarios.

The SDK provides specific error types to help you handle different scenarios.

```typescript example.ts theme={null}
import {
  GradeLevelAppropriatenessEvaluator,
  ConfigurationError
} from "@learning-commons/evaluators";

try {
  const evaluator = new GradeLevelAppropriatenessEvaluator(configOptions);
  const result = await evaluator.evaluate(text);
} catch (error) {
  if (error instanceof ConfigurationError) {
    console.error("Fix config:", error.message);
  } else  { ... }
}
```

## Errors

| Type | Description |
| - | - |
| `ConfigurationError` | Missing or invalid API keys |
| `ValidationError` | Invalid input (text too short, invalid grade, etc.) |
| `AuthenticationError` | Invalid API keys |
| `RateLimitError` | Rate limit exceeded; wait and retry |
| `NetworkError` | Network connectivity issues |
| `TimeoutError` | Request timed out |
| `APIError` | Other API errors |
