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

推荐订阅源

H
Hackread – Cybersecurity News, Data Breaches, AI and More
G
Google Developers Blog
The GitHub Blog
The GitHub Blog
Jina AI
Jina AI
A
About on SuperTechFans
MongoDB | Blog
MongoDB | Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园_首页
Blog — PlanetScale
Blog — PlanetScale
酷 壳 – CoolShell
酷 壳 – CoolShell
Google DeepMind News
Google DeepMind News
D
DataBreaches.Net
B
Blog RSS Feed
大猫的无限游戏
大猫的无限游戏
美团技术团队
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
L
LangChain Blog
WordPress大学
WordPress大学
S
SegmentFault 最新的问题
腾讯CDC
Hugging Face - Blog
Hugging Face - Blog
阮一峰的网络日志
阮一峰的网络日志
H
Help Net Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻

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
WorkflowRunNotCompletedError
2026-06-12 · via Workflow SDK Documentation

Thrown when requesting the result of a workflow run that has not completed yet.

WorkflowRunNotCompletedError is thrown when requesting the result of a workflow run that has not completed yet. The run's current status (for example pending or running) is available on the error.

run.returnValue() handles this error internally — it polls until the run completes — so you will mainly encounter it when building custom polling logic on lower-level APIs.

import { WorkflowRunNotCompletedError } from "workflow/errors"
declare function readRunResult(runId: string): Promise<unknown>; // @setup
declare const runId: string; // @setup

try {
  const result = await readRunResult(runId);
} catch (error) {
  if (WorkflowRunNotCompletedError.is(error)) { 
    console.log(`Run ${error.runId} is still ${error.status}`);
  }
}

Properties

NameTypeDescription
runIdstringThe workflow run ID.
statusstringThe run's status at the time of the error (e.g. "pending", "running").
messagestringThe error message.

Static Methods

WorkflowRunNotCompletedError.is(value)

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

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

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