PublicMcpError (safe to surface to clients) except TaskStoreNotInitializedError.
Reference
Usage
Related
- Tasks — opt a tool into task augmentation
- Errors Overview
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Error classes for the task-augmented tool invocation lifecycle
PublicMcpError (safe to surface to clients) except TaskStoreNotInitializedError.
| Class | Inherits | JSON-RPC Code | When |
|---|---|---|---|
TaskNotFoundError | PublicMcpError | -32602 | tasks/get, tasks/cancel, or tasks/result referenced an unknown task ID |
TaskAlreadyTerminalError | PublicMcpError | -32602 | tasks/cancel invoked on a task already in succeeded/failed/cancelled |
TaskAugmentationNotSupportedError | PublicMcpError | -32601 | Client invoked tools/call with task augmentation on a tool that opts out |
TaskAugmentationRequiredError | PublicMcpError | -32601 | Tool declared taskSupport: 'required' but client did not request a task |
TaskStoreNotInitializedError | InternalMcpError | — | Internal: task store provider not registered when task subsystem is required |
import { TaskNotFoundError, TaskAlreadyTerminalError } from '@frontmcp/sdk';
if (!task) {
throw new TaskNotFoundError(taskId);
}
if (isTerminal(task.status)) {
throw new TaskAlreadyTerminalError(task.status);
}