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

推荐订阅源

GbyAI
GbyAI
人人都是产品经理
人人都是产品经理
Hugging Face - Blog
Hugging Face - Blog
罗磊的独立博客
博客园 - 【当耐特】
D
Docker
Y
Y Combinator Blog
L
LangChain Blog
博客园 - 三生石上(FineUI控件)
I
InfoQ
阮一峰的网络日志
阮一峰的网络日志
F
Fortinet All Blogs
J
Java Code Geeks
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
V2EX
B
Blog
The GitHub Blog
The GitHub Blog
腾讯CDC
MongoDB | Blog
MongoDB | Blog
博客园 - Franky
爱范儿
爱范儿
A
About on SuperTechFans
量子位
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC

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

Thrown when creating a hook with a token that is already in use by another workflow run.

HookConflictError is thrown when creating a hook with a token that is already in use by another active workflow run. Hook tokens must be unique across all running workflows — see the hook-conflict error guide for resolution strategies.

import { HookConflictError } from "workflow/errors"
declare function startApprovalWorkflow(token: string): Promise<void>; // @setup
declare const token: string; // @setup

try {
  await startApprovalWorkflow(token);
} catch (error) {
  if (HookConflictError.is(error)) { 
    console.error(
      `Token "${error.token}" already in use by run ${error.conflictingRunId}`
    );
  }
}

Properties

NameTypeDescription
tokenstringThe hook token that conflicted.
conflictingRunIdstringThe run ID of the workflow currently holding the token, when known.
messagestringThe error message.

Static Methods

HookConflictError.is(value)

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

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

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