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

# Rate Limit Errors

> Errors for rate limiting and quota enforcement.

## Overview

Rate limit errors are thrown when a client exceeds request rate limits or usage quotas. Both are public errors that inform the client about the limitation.

## Error Reference

### RateLimitError

Thrown when a client exceeds the configured request rate limit.

| Property | Type | Value |
| - | - | - |
| `code` | `string` | `RATE_LIMIT_EXCEEDED` |
| `statusCode` | `number` | `429` |
| `isPublic` | `boolean` | `true` |

```typescript theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
new RateLimitError(retryAfter?: number)
```

When `retryAfter` is provided, the message includes the number of seconds the client should wait before retrying.

**Example:**

```typescript theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
import { RateLimitError } from '@frontmcp/sdk';

throw new RateLimitError(60);
// "Rate limit exceeded. Retry after 60 seconds"

throw new RateLimitError();
// "Rate limit exceeded"
```

***

### QuotaExceededError

Thrown when a client exceeds a usage quota (e.g., monthly API calls, storage).

| Property | Type | Value |
| - | - | - |
| `code` | `string` | `QUOTA_EXCEEDED` |
| `statusCode` | `number` | `429` |
| `isPublic` | `boolean` | `true` |

```typescript theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
new QuotaExceededError(quotaType?: string)
```

**Example:**

```typescript theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
import { QuotaExceededError } from '@frontmcp/sdk';

throw new QuotaExceededError('monthly API calls');
// "monthly API calls quota exceeded"

throw new QuotaExceededError();
// "usage quota exceeded"
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.