---
title: WorkflowError
description: Base class for all workflow error types.
docs_index: /llms.txt
lastUpdated: 2026-10-21
type: reference
summary: All errors thrown by the Workflow SDK extend WorkflowError.
related:
  - /docs/foundations/errors-and-retries
---

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

`WorkflowError` is the base class that all Workflow SDK error types extend, such as [`WorkflowRunFailedError`](/docs/api-reference/workflow-errors/workflow-run-failed-error) and [`HookNotFoundError`](/docs/api-reference/workflow-errors/hook-not-found-error). It extends `Error` with an optional `cause` and, for some subclasses, a link to the relevant error documentation appended to the message.

```typescript lineNumbers
import { WorkflowError } from "workflow/errors"

const error = new WorkflowError("something went wrong", {
  cause: new Error("underlying cause"),
});
```

## API signature

### Properties

### Static methods

#### `WorkflowError.is(value)`

Type-safe check for `WorkflowError` instances. Preferred over `instanceof` because it works across module boundaries and virtual machine contexts.

> `WorkflowError.is()` matches only direct `WorkflowError` instances, not subclasses, which override the error name it checks. To handle a specific error type, use that subclass's own `.is()` method (e.g. `WorkflowRunFailedError.is(error)`).

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

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

---

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)