> ## 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.

# Elicitation Errors

> Errors for MCP elicitation requests, timeouts, and store issues.

## Overview

Elicitation errors are thrown during the MCP elicitation flow — the mechanism that allows tools to request additional user input during execution. These errors cover unsupported clients, timeouts, fallback flows, store initialization, encryption failures, and subscription issues.

## Error Reference

### ElicitationNotSupportedError

Thrown when attempting to elicit from a client that does not support elicitation or when the transport is unavailable.

| Property | Type | Value |
| - | - | - |
| `code` | `string` | `ELICITATION_NOT_SUPPORTED` |
| `statusCode` | `number` | `400` |
| `isPublic` | `boolean` | `true` |

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

**Example:**

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

throw new ElicitationNotSupportedError('Client does not support elicitation');
```

The fallback also throws it for an anonymous caller without a verified session: no later `sendElicitationResult` call could be matched to that caller.

***

### ElicitationNotOwnedError

Thrown by `sendElicitationResult` when the caller answering is not the one the elicitation was asked of. A pending fallback elicitation belongs to the session the server verified when the tool asked, or to the authenticated caller when there was no session. Mapped to JSON-RPC `-32003`.

| Property | Type | Value |
| - | - | - |
| `code` | `string` | `ELICITATION_NOT_OWNED` |
| `statusCode` | `number` | `403` |
| `isPublic` | `boolean` | `true` |
| `elicitId` | `string` | The elicitation requested |

```typescript theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
new ElicitationNotOwnedError(elicitId: string)
```

***

### ElicitationTimeoutError

Thrown when an elicitation request times out waiting for the user's response.

| Property | Type | Value |
| - | - | - |
| `code` | `string` | `ELICITATION_TIMEOUT` |
| `statusCode` | `number` | `408` |
| `isPublic` | `boolean` | `true` |
| `elicitId` | `string` | The timed-out request ID |
| `ttl` | `number` | The TTL that was exceeded (ms) |

```typescript theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
new ElicitationTimeoutError(elicitId: string, ttl: number)
```

**Example:**

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

throw new ElicitationTimeoutError('elicit_abc', 60000);
// Public: "Elicitation request timed out. The user did not respond within the allowed time (60 seconds)."
```

***

### ElicitationFallbackRequired

Thrown when elicitation is requested but the client doesn't support the standard protocol. This is **not** a failure — it triggers the fallback flow where the tool returns instructions to the LLM, and the LLM uses `sendElicitationResult` to continue.

| Property | Type | Value |
| - | - | - |
| `code` | `string` | `ELICITATION_FALLBACK` |
| `statusCode` | `number` | `200` |
| `isPublic` | `boolean` | `true` |
| `elicitId` | `string` | Unique elicitation request ID |
| `elicitMessage` | `string` | Message to display to user |
| `schema` | `Record<string, unknown>` | JSON Schema for expected response |
| `toolName` | `string` | Tool that requested elicitation |
| `toolInput` | `unknown` | Original tool input args |
| `ttl` | `number` | Time-to-live (ms) |

```typescript theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
new ElicitationFallbackRequired(
  elicitId: string,
  elicitMessage: string,
  schema: Record<string, unknown>,
  toolName: string,
  toolInput: unknown,
  ttl: number,
)
```

<Note>
  This error has a `statusCode` of `200` because it is not a failure — it's a signal to switch to the fallback elicitation flow.
</Note>

***

### ElicitationStoreNotInitializedError

Thrown when attempting to access the elicitation store before scope initialization has completed. Callers should `await scope.ready` before accessing `elicitationStore`.

| Property | Type | Value |
| - | - | - |
| `code` | `string` | `ELICITATION_STORE_NOT_INITIALIZED` |
| `statusCode` | `number` | `500` |
| `isPublic` | `boolean` | `false` |

```typescript theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
new ElicitationStoreNotInitializedError()
```

***

### ElicitationDisabledError

Thrown when elicitation is used but disabled in server configuration. Enable via `@FrontMcp({ elicitation: { enabled: true } })`.

| Property | Type | Value |
| - | - | - |
| `code` | `string` | `ELICITATION_DISABLED` |
| `statusCode` | `number` | `400` |
| `isPublic` | `boolean` | `true` |

```typescript theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
new ElicitationDisabledError()
```

The internal message includes configuration guidance. The public message is: `"Elicitation is disabled on this server."`

***

### ElicitationEncryptionError

Thrown when encryption or decryption of elicitation data fails — typically when the session ID is missing or key derivation fails.

| Property | Type | Value |
| - | - | - |
| `code` | `string` | `ELICITATION_ENCRYPTION_ERROR` |
| `statusCode` | `number` | `500` |
| `isPublic` | `boolean` | `false` |
| `originalError` | `Error \| undefined` | The underlying cause |

```typescript theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
new ElicitationEncryptionError(message: string, originalError?: Error)
```

***

### ElicitationSubscriptionError

Thrown when subscription to the elicitation pub/sub channel fails. This indicates a transport or infrastructure failure, not a user non-response (which would be a timeout).

| Property | Type | Value |
| - | - | - |
| `code` | `string` | `ELICITATION_SUBSCRIPTION_ERROR` |
| `statusCode` | `number` | `500` |
| `isPublic` | `boolean` | `false` |
| `elicitId` | `string` | The elicitation request ID |
| `originalError` | `Error \| undefined` | The underlying cause |

```typescript theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
new ElicitationSubscriptionError(elicitId: string, originalError?: Error)
```


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