Files
vercel__workflow/.changeset/reject-empty-hook-token.md
Pranay Prakash a92c16debd Reject empty-string hook tokens in createHook() (#2490)
createHook() used `options.token ?? ctx.generateNanoid()`, so a nullish
token fell back to a generated one but an empty string `""` was accepted
verbatim — a meaningless, non-deterministic token that is almost always
an accidental value (e.g. an unset variable). Throw a clear error when an
explicit empty-string token is passed; `undefined`/`null` still
auto-generate, and non-empty strings are unchanged.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 09:41:36 -07:00

193 B

@workflow/core
@workflow/core
patch

Reject an explicit empty-string token in createHook(). Omit the option (or pass undefined) to get a randomly generated token, or pass a non-empty string.