---
title: WorkflowRunCancelledError
description: Thrown when awaiting the return value of a canceled workflow run.
docs_index: /llms.txt
lastUpdated: 2026-10-13
type: reference
summary: Catch WorkflowRunCancelledError when awaiting run.returnValue on a run that was canceled.
related:
  - /docs/api-reference/workflow-errors/workflow-run-failed-error
  - /docs/api-reference/workflow-errors/workflow-run-not-found-error
---

> For an index of all documentation, see [/llms.txt](/llms.txt).

`WorkflowRunCancelledError` is thrown when awaiting `run.returnValue` on a workflow run that was explicitly canceled via `run.cancel()`. Canceled runs do not produce a return value.

You can check for cancellation before awaiting by inspecting `run.status`.

A canceled run is terminal, so this error is non-retryable (`fatal: true`). Inside a workflow, `await run.returnValue` runs as a step, and that step fails on its first attempt instead of spending its retry budget re-reading a run that cannot change. Errors from *failing to read* the run, such as a transport blip, stay retryable.

```typescript lineNumbers
import { WorkflowRunCancelledError } from "workflow/errors"
declare const run: { status: Promise<string>; returnValue: Promise<any> }; // @setup

try {
  const result = await run.returnValue;
} catch (error) {
  if (WorkflowRunCancelledError.is(error)) { // [!code highlight]
    console.log(`Run ${error.runId} was cancelled`);
  }
}
```

## API signature

### Properties

### Static methods

#### `WorkflowRunCancelledError.is(value)`

Type-safe check for `WorkflowRunCancelledError` instances. Preferred over `instanceof` because it works across module boundaries and VM contexts.

```typescript
import { WorkflowRunCancelledError } from "workflow/errors"
declare const error: unknown; // @setup

if (WorkflowRunCancelledError.is(error)) {
  // error is typed as WorkflowRunCancelledError
}
```

---

For a semantic overview of all documentation, see [/sitemap.md](/sitemap.md)

For an index of all available documentation, see [/llms.txt](/llms.txt)

For agent-facing discovery, including API and MCP surfaces, see [/agents.md](/agents.md)