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

推荐订阅源

Microsoft Azure Blog
Microsoft Azure Blog
WordPress大学
WordPress大学
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The Cloudflare Blog
U
Unit 42
D
Docker
Hugging Face - Blog
Hugging Face - Blog
博客园 - 聂微东
Recent Announcements
Recent Announcements
GbyAI
GbyAI
T
The Blog of Author Tim Ferriss
Last Week in AI
Last Week in AI
V
Visual Studio Blog
I
InfoQ
Google DeepMind News
Google DeepMind News
小众软件
小众软件
L
LangChain Blog
C
Check Point Blog
宝玉的分享
宝玉的分享
Martin Fowler
Martin Fowler
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 【当耐特】
J
Java Code Geeks
罗磊的独立博客

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
WorkflowWorldError
2026-05-31 · via Workflow SDK Documentation

Base error for failures from workflow storage backends.

WorkflowWorldError is the base error class for failures originating from a workflow world (storage backend). World implementations (local, Postgres, Vercel) throw subclasses of this error when storage operations fail.

You can use instanceof WorkflowWorldError to catch any world-related error regardless of the specific type. Note that the static .is() method only matches errors constructed directly as WorkflowWorldError — use the subclass-specific .is() methods (e.g. EntityConflictError.is()) to match specific error types.

Most world errors are handled automatically by the Workflow runtime. You will typically only encounter these errors when interacting with world storage APIs directly or when there are infrastructure-level issues.

import { WorkflowWorldError } from "workflow/errors"
declare const world: { events: { create(...args: any[]): Promise<any> } }; // @setup
declare const runId: string; // @setup
declare const event: any; // @setup

try {
  await world.events.create(runId, event);
} catch (error) {
  if (error instanceof WorkflowWorldError) { 
    console.error("Storage backend error:", error.message);
  }
}

Properties

NameTypeDescription
statusnumberHTTP status code from the world backend, if available.
codestringMachine-readable error code, if available.
urlstringThe URL that was requested, if available.
retryAfternumberRetry-After value in seconds, present on 429 and 425 responses.
messagestringThe error message.

Static Methods

WorkflowWorldError.is(value)

Type-safe check that matches only errors constructed directly as WorkflowWorldError. Does not match subclasses like EntityConflictError — use instanceof to catch all world errors, or the subclass-specific .is() methods.

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

if (WorkflowWorldError.is(error)) {
  // error is typed as WorkflowWorldError (not subclasses)
}

Subclasses

The following error types extend WorkflowWorldError: