惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

云风的 BLOG
云风的 BLOG
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
F
Fortinet All Blogs
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 叶小钗
爱范儿
爱范儿
美团技术团队
H
Hackread – Cybersecurity News, Data Breaches, AI and More
有赞技术团队
有赞技术团队
博客园_首页
T
The Blog of Author Tim Ferriss
T
Tailwind CSS Blog
V
Visual Studio Blog
Jina AI
Jina AI
博客园 - Franky
量子位
MongoDB | Blog
MongoDB | Blog
L
LangChain Blog
Apple Machine Learning Research
Apple Machine Learning Research
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
U
Unit 42
aimingoo的专栏
aimingoo的专栏
M
MIT News - Artificial intelligence

Workflow SDK Documentation

Patterns for Defining Tools Human-in-the-Loop Building Durable AI Agents Queueing User Messages Resumable Streams Sleep, Suspense, and Scheduling Streaming Updates from Tools API Reference Workflow Globals Changelog Resilient run start Cookbook Building a World Deploying Astro Express Fastify Hono Getting Started NestJS Next.js Nitro Nuxt Python SvelteKit Vite corrupted-event-log fetch-in-workflow hook-conflict Errors
WorkflowError
2026-06-12 · via Workflow SDK Documentation

Base class for all workflow error types.

WorkflowError is the base class that all Workflow SDK error types extend, such as WorkflowRunFailedError and HookNotFoundError. It extends Error with an optional cause and, for some subclasses, a link to the relevant error documentation appended to the message.

import { WorkflowError } from "workflow/errors"

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

Properties

NameTypeDescription
messagestringThe error message.
causeunknownThe underlying cause, when provided.

Static Methods

WorkflowError.is(value)

Type-safe check for WorkflowError instances. Preferred over instanceof because it works across module boundaries and VM 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)).

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

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