mirror of
https://github.com/vercel/workflow.git
synced 2026-09-14 19:59:43 +08:00
e6af70b9d9
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
320 lines
18 KiB
Markdown
320 lines
18 KiB
Markdown
# @workflow/errors
|
|
|
|
## 5.0.0-beta.16
|
|
|
|
### Minor Changes
|
|
|
|
- [#2960](https://github.com/vercel/workflow/pull/2960) [`79e4c04`](https://github.com/vercel/workflow/commit/79e4c044091185e68bbdcc254a86133e54956ad3) Thanks [@alangenfeld](https://github.com/alangenfeld)! - Re-route a queue delivery that reaches a deployment other than the one its run is pinned to, retry transient publishing failures through normal queue redelivery, and fail the run with the new `DEPLOYMENT_MISMATCH` error code once the recovery budget is spent.
|
|
|
|
## 5.0.0-beta.15
|
|
|
|
### Minor Changes
|
|
|
|
- [#3145](https://github.com/vercel/workflow/pull/3145) [`1471f25`](https://github.com/vercel/workflow/commit/1471f252fa18024695f1bf149f5bee4876ab149e) Thanks [@VaguelySerious](https://github.com/VaguelySerious)! - Strengthen the event-creation precondition guard: replay-context writes now also send the number of loaded events, so a snapshot that is missing an event is rejected instead of committing a divergent event log, and a rejection restarts the replay in-process (consuming the events a world may attach to the rejection) rather than re-committing the rejected payload or re-invoking over the queue. `@workflow/world-local` and `@workflow/world-postgres` do not implement the check.
|
|
|
|
## 5.0.0-beta.14
|
|
|
|
### Patch Changes
|
|
|
|
- Updated dependencies [[`a09d001`](https://github.com/vercel/workflow/commit/a09d00135bd96f22bd1ae1dee6b5a6f797b7d804)]:
|
|
- @workflow/utils@5.0.0-beta.8
|
|
|
|
## 5.0.0-beta.13
|
|
|
|
### Patch Changes
|
|
|
|
- [#3061](https://github.com/vercel/workflow/pull/3061) [`62d570e`](https://github.com/vercel/workflow/commit/62d570ed4bf38db333ae9fe9ba513c0d6a9d6b91) Thanks [@NathanColosimo](https://github.com/NathanColosimo)! - Remove the retired step route runtime and make queue health checks target the combined flow handler.
|
|
|
|
- Updated dependencies [[`49276f2`](https://github.com/vercel/workflow/commit/49276f2d0b11d7552ac4504936cbca51df4ce98d), [`62d570e`](https://github.com/vercel/workflow/commit/62d570ed4bf38db333ae9fe9ba513c0d6a9d6b91)]:
|
|
- @workflow/utils@5.0.0-beta.7
|
|
|
|
## 5.0.0-beta.12
|
|
|
|
### Patch Changes
|
|
|
|
- [#2986](https://github.com/vercel/workflow/pull/2986) [`fe12b84`](https://github.com/vercel/workflow/commit/fe12b847291912cf9e47143ee10c73828dbdf1a1) Thanks [@shalabhc](https://github.com/shalabhc)! - Enforce a server-supplied per-run event limit (default 25K)
|
|
|
|
- [#2946](https://github.com/vercel/workflow/pull/2946) [`eb8fdb9`](https://github.com/vercel/workflow/commit/eb8fdb979748f54a94289530ee7ac155feddddcc) Thanks [@VaguelySerious](https://github.com/VaguelySerious)! - The `WORKFLOW_PRECONDITION_GUARD` event-creation guard is now on by default; opt out with `WORKFLOW_PRECONDITION_GUARD=0`.
|
|
|
|
## 5.0.0-beta.11
|
|
|
|
### Minor Changes
|
|
|
|
- [#2266](https://github.com/vercel/workflow/pull/2266) [`a00d169`](https://github.com/vercel/workflow/commit/a00d16947085f8e94cf191c4d8850121cf201a94) Thanks [@VaguelySerious](https://github.com/VaguelySerious)! - Add an opt-in optimistic-concurrency guard for event creation (`WORKFLOW_PRECONDITION_GUARD=1`): replay-context event creations send a `stateUpdatedAt` snapshot timestamp, and the runtime reloads the event log and retries (then falls back to a queue re-invocation) when the backend reports a newer out-of-band event with a 412 `PreconditionFailedError`.
|
|
|
|
## 5.0.0-beta.10
|
|
|
|
### Patch Changes
|
|
|
|
- Updated dependencies [[`239031a`](https://github.com/vercel/workflow/commit/239031ad9e1d27942f8e30a59fd6fef254544fff), [`0f557d5`](https://github.com/vercel/workflow/commit/0f557d5ae4b5ede07fd371988c6d0afda194555d)]:
|
|
- @workflow/utils@5.0.0-beta.6
|
|
|
|
## 5.0.0-beta.9
|
|
|
|
### Patch Changes
|
|
|
|
- Updated dependencies [[`f6772d9`](https://github.com/vercel/workflow/commit/f6772d95c81038bfa57aa14ea2cca20a07191475)]:
|
|
- @workflow/utils@5.0.0-beta.5
|
|
|
|
## 5.0.0-beta.8
|
|
|
|
### Patch Changes
|
|
|
|
- Updated dependencies [[`926a5e7`](https://github.com/vercel/workflow/commit/926a5e7c6a50c1e74f2e2cc37324caa0f6442d85)]:
|
|
- @workflow/utils@5.0.0-beta.4
|
|
|
|
## 5.0.0-beta.7
|
|
|
|
### Patch Changes
|
|
|
|
- [#2212](https://github.com/vercel/workflow/pull/2212) [`2a3b11b`](https://github.com/vercel/workflow/commit/2a3b11bcb408f1aa071b0e37f0b2df614052acd1) Thanks [@pranaygp](https://github.com/pranaygp)! - Retry transient workflow replay divergence before classifying repeated divergence as a corrupted event log.
|
|
|
|
## 5.0.0-beta.6
|
|
|
|
### Patch Changes
|
|
|
|
- [#2145](https://github.com/vercel/workflow/pull/2145) [`8d0928b`](https://github.com/vercel/workflow/commit/8d0928b2a2ce61b6c05cb8930d29f176b3a83970) Thanks [@TooTallNate](https://github.com/TooTallNate)! - Classify SDK-level AES-GCM encryption failures as `RUNTIME_ERROR` instead of `USER_ERROR` via a new `RuntimeDecryptionError`.
|
|
|
|
## 5.0.0-beta.5
|
|
|
|
### Patch Changes
|
|
|
|
- [#1799](https://github.com/vercel/workflow/pull/1799) [`503a929`](https://github.com/vercel/workflow/commit/503a929d347df46eb0ad63b068da7781762d0dc8) Thanks [@TooTallNate](https://github.com/TooTallNate)! - Use inline sourcemaps for all workspace packages; published packages no longer ship external `.js.map` files.
|
|
|
|
- Updated dependencies [[`503a929`](https://github.com/vercel/workflow/commit/503a929d347df46eb0ad63b068da7781762d0dc8)]:
|
|
- @workflow/utils@5.0.0-beta.3
|
|
|
|
## 5.0.0-beta.4
|
|
|
|
### Patch Changes
|
|
|
|
- [#2046](https://github.com/vercel/workflow/pull/2046) [`ad71b58`](https://github.com/vercel/workflow/commit/ad71b58bba65e739fbafee0440ffff48878e7e51) Thanks [@pranaygp](https://github.com/pranaygp)! - Report corrupted event logs with a distinct `CorruptedEventLogError` type and `CORRUPTED_EVENT_LOG` run error code.
|
|
|
|
- [#2060](https://github.com/vercel/workflow/pull/2060) [`1d3959e`](https://github.com/vercel/workflow/commit/1d3959eaa8db5866d08ad3970324c1b5dae73f7b) Thanks [@pranaygp](https://github.com/pranaygp)! - Record fatal world response contract failures as non-retryable workflow errors.
|
|
|
|
## 5.0.0-beta.3
|
|
|
|
### Patch Changes
|
|
|
|
- [#2012](https://github.com/vercel/workflow/pull/2012) [`9d2a926`](https://github.com/vercel/workflow/commit/9d2a9261fd9355b8e8f41342dd8b81b272162837) Thanks [@pranaygp](https://github.com/pranaygp)! - Expose the active run ID on hook token conflict errors.
|
|
|
|
## 5.0.0-beta.2
|
|
|
|
### Major Changes
|
|
|
|
- [#1851](https://github.com/vercel/workflow/pull/1851) [`5f22832`](https://github.com/vercel/workflow/commit/5f228326757f7da349edfed89845bd109c98f104) Thanks [@TooTallNate](https://github.com/TooTallNate)! - **BREAKING CHANGE**: Run and step errors are now serialized through the workflow serialization pipeline, preserving original class identity and cause chains on `WorkflowRunFailedError.cause`. Pre-upgrade failed runs in the `world-postgres` legacy `error` text column surface as `error: undefined` on read; the original payload is still readable directly from the `errorJson` column for manual inspection.
|
|
|
|
### Patch Changes
|
|
|
|
- [#1915](https://github.com/vercel/workflow/pull/1915) [`540a2ef`](https://github.com/vercel/workflow/commit/540a2efb99c137b0d60c7368376e9533ea662a4c) Thanks [@VaguelySerious](https://github.com/VaguelySerious)! - Replace the `chalk` import in `@workflow/errors/ansi` with a tiny inline ANSI shim. `@workflow/errors/ansi` is reachable from the workflow-VM bundle (via `@workflow/core/workflow` → `context-errors` → `context-violation-error` → here), and `chalk` pulls in `supports-color`, which calls `require('os')` at module load — crashing every workflow with `ReferenceError: require is not defined` in the sandboxed VM.
|
|
|
|
- [#1849](https://github.com/vercel/workflow/pull/1849) [`1203dae`](https://github.com/vercel/workflow/commit/1203dae70c802eef114909e9476e19ec528550cd) Thanks [@pranaygp](https://github.com/pranaygp)! - Friendlier workflow error messages. New `SerializationError`, `WorkflowBuildError`, and structured context-violation classes (e.g. `NotInWorkflowContextError`) with actionable hints and docs links applied to user-facing throw sites; `FatalError.is()` recognizes any error with `fatal: true` so context violations and serialization failures now fail fast instead of burning retry attempts. Runtime logs are namespaced under `[workflow-sdk]` and gain `errorAttribution` (`user` vs `sdk`) plus class-aware hints
|
|
|
|
- [#1849](https://github.com/vercel/workflow/pull/1849) [`1203dae`](https://github.com/vercel/workflow/commit/1203dae70c802eef114909e9476e19ec528550cd) Thanks [@pranaygp](https://github.com/pranaygp)! - Replace `util.inspect`'s default object dump for runtime structured-log metadata with an opinionated, workflow-aware formatter. The runtime logger uses color-coded metadata blocks.
|
|
|
|
- Updated dependencies [[`1203dae`](https://github.com/vercel/workflow/commit/1203dae70c802eef114909e9476e19ec528550cd)]:
|
|
- @workflow/utils@5.0.0-beta.2
|
|
|
|
## 5.0.0-beta.1
|
|
|
|
### Patch Changes
|
|
|
|
- [#1769](https://github.com/vercel/workflow/pull/1769) [`5a42964`](https://github.com/vercel/workflow/commit/5a4296412f151c255a8d08c8870e511222c7c472) Thanks [@tomdale](https://github.com/tomdale)! - Embed source content in published sourcemaps.
|
|
|
|
- [#1759](https://github.com/vercel/workflow/pull/1759) [`173756d`](https://github.com/vercel/workflow/commit/173756dc4d097fd90432e2c38c91ce1b959a6352) Thanks [@TooTallNate](https://github.com/TooTallNate)! - Rename `useworkflow.dev` URLs to `workflow-sdk.dev`
|
|
|
|
- Updated dependencies [[`5a42964`](https://github.com/vercel/workflow/commit/5a4296412f151c255a8d08c8870e511222c7c472), [`173756d`](https://github.com/vercel/workflow/commit/173756dc4d097fd90432e2c38c91ce1b959a6352)]:
|
|
- @workflow/utils@5.0.0-beta.1
|
|
|
|
## 5.0.0-beta.0
|
|
|
|
### Major Changes
|
|
|
|
- [#1642](https://github.com/vercel/workflow/pull/1642) [`c5cdfc0`](https://github.com/vercel/workflow/commit/c5cdfc00751c5bef36c4be748d819081b934fbcd) Thanks [@VaguelySerious](https://github.com/VaguelySerious)! - Initial v5 beta release
|
|
|
|
### Patch Changes
|
|
|
|
- Updated dependencies [[`c5cdfc0`](https://github.com/vercel/workflow/commit/c5cdfc00751c5bef36c4be748d819081b934fbcd)]:
|
|
- @workflow/utils@5.0.0-beta.0
|
|
|
|
## 4.1.0-beta.20
|
|
|
|
### Patch Changes
|
|
|
|
- [#1567](https://github.com/vercel/workflow/pull/1567) [`6dc1b78`](https://github.com/vercel/workflow/commit/6dc1b785822af5c1dc3b4a2a9b1dcb7f626cf5ff) Thanks [@VaguelySerious](https://github.com/VaguelySerious)! - Increase flow route limit to max fluid duration and fail run if a single replay takes too long
|
|
|
|
## 4.1.0-beta.19
|
|
|
|
### Patch Changes
|
|
|
|
- [#1448](https://github.com/vercel/workflow/pull/1448) [`73a851a`](https://github.com/vercel/workflow/commit/73a851ada6a4d46ae8f022ef243ebf4ee3de2ad8) Thanks [@pranaygp](https://github.com/pranaygp)! - Add `HookConflictError` to `@workflow/errors` and use it for hook token conflicts instead of `WorkflowRuntimeError`
|
|
|
|
- [#1340](https://github.com/vercel/workflow/pull/1340) [`84599b7`](https://github.com/vercel/workflow/commit/84599b7ec5c19207082523609f1b3508a1a18bd7) Thanks [@pranaygp](https://github.com/pranaygp)! - Add error code classification (`USER_ERROR`, `RUNTIME_ERROR`) to `run_failed` events, improve queue and schema validation error logging
|
|
|
|
- [#1447](https://github.com/vercel/workflow/pull/1447) [`2ef33d2`](https://github.com/vercel/workflow/commit/2ef33d2828ac06debf04ad9cc239d70fea6a8093) Thanks [@pranaygp](https://github.com/pranaygp)! - Export semantic error types from `workflow/internal/errors` and add API reference documentation
|
|
|
|
- [#1452](https://github.com/vercel/workflow/pull/1452) [`672d919`](https://github.com/vercel/workflow/commit/672d9195a475a110a64dbaa7c5c87a24f244c11a) Thanks [@pranaygp](https://github.com/pranaygp)! - Fix workflow/step not found errors to fail gracefully instead of causing infinite queue retries
|
|
|
|
- [#1344](https://github.com/vercel/workflow/pull/1344) [`beccbc4`](https://github.com/vercel/workflow/commit/beccbc4298f434a4ffb9563c4f832f2230016f40) Thanks [@pranaygp](https://github.com/pranaygp)! - Remove VQS maxDeliveries cap and enforce max delivery limit in workflow/step handlers with graceful failure
|
|
|
|
- [#1342](https://github.com/vercel/workflow/pull/1342) [`aee035f`](https://github.com/vercel/workflow/commit/aee035f94483ef3b842bb557e8c5b167dd0536c4) Thanks [@pranaygp](https://github.com/pranaygp)! - Replace HTTP status code checks with semantic error types (EntityConflictError, RunExpiredError, ThrottleError, TooEarlyError). **BREAKING CHANGE**: `WorkflowAPIError` renamed to `WorkflowWorldError`.
|
|
|
|
## 4.1.0-beta.18
|
|
|
|
### Patch Changes
|
|
|
|
- [#1270](https://github.com/vercel/workflow/pull/1270) [`adfe8b6`](https://github.com/vercel/workflow/commit/adfe8b6b1123ce581aa9572bae91b8d7f9cdc53d) Thanks [@pranaygp](https://github.com/pranaygp)! - Add `HookNotFoundError` to `@workflow/errors` and adopt it across all world backends
|
|
|
|
## 4.1.0-beta.17
|
|
|
|
### Patch Changes
|
|
|
|
- Updated dependencies [[`e55c636`](https://github.com/vercel/workflow/commit/e55c63678b15b6687cc77efca705ee9fb40fabc3)]:
|
|
- @workflow/utils@4.1.0-beta.13
|
|
|
|
## 4.1.0-beta.16
|
|
|
|
### Patch Changes
|
|
|
|
- [#1055](https://github.com/vercel/workflow/pull/1055) [`c2b4fe9`](https://github.com/vercel/workflow/commit/c2b4fe9906fd0845fef646669034cd203d97a18d) Thanks [@pranaygp](https://github.com/pranaygp)! - Detect and fatal error on orphaned/invalid events in the event log instead of silently hanging
|
|
|
|
## 4.1.0-beta.15
|
|
|
|
### Patch Changes
|
|
|
|
- [#966](https://github.com/vercel/workflow/pull/966) [`56f2221`](https://github.com/vercel/workflow/commit/56f22219b338a5a2c29466798a5ad36a6a450498) Thanks [@VaguelySerious](https://github.com/VaguelySerious)! - Add 429 throttle retry handling and 500 server error retry with exponential backoff to the workflow and step runtimes
|
|
|
|
- Updated dependencies [[`3d770d5`](https://github.com/vercel/workflow/commit/3d770d53855ce7c8522d4f0afbdbc123eae6c1ee)]:
|
|
- @workflow/utils@4.1.0-beta.12
|
|
|
|
## 4.1.0-beta.14
|
|
|
|
### Minor Changes
|
|
|
|
- [#621](https://github.com/vercel/workflow/pull/621) [`4966b72`](https://github.com/vercel/workflow/commit/4966b728a8c8ac339fd98ed91af222f406479fae) Thanks [@pranaygp](https://github.com/pranaygp)! - **BREAKING**: Storage interface is now read-only; all mutations go through `events.create()`
|
|
- Remove `cancel`, `pause`, `resume` from `runs`
|
|
- Remove `create`, `update` from `runs`, `steps`, `hooks`
|
|
- Add run lifecycle events: `run_created`, `run_started`, `run_completed`, `run_failed`, `run_cancelled`
|
|
- Add `step_created` event type
|
|
- Remove `fatal` field from `step_failed` (terminal failure is now implicit)
|
|
- Add `step_retrying` event with error info for retriable failures
|
|
|
|
### Patch Changes
|
|
|
|
- [#621](https://github.com/vercel/workflow/pull/621) [`4966b72`](https://github.com/vercel/workflow/commit/4966b728a8c8ac339fd98ed91af222f406479fae) Thanks [@pranaygp](https://github.com/pranaygp)! - Add backwards compatibility for runs created with different spec versions
|
|
- Add `RunNotSupportedError` for runs requiring newer world versions
|
|
- Add semver-based version comparison utilities
|
|
- Legacy runs (< 4.1): route to legacy handlers
|
|
- `run_cancelled`: skip event storage, directly update run
|
|
- `wait_completed`: store event only (no entity mutation)
|
|
- Unknown legacy events: throw error
|
|
|
|
- [#621](https://github.com/vercel/workflow/pull/621) [`4966b72`](https://github.com/vercel/workflow/commit/4966b728a8c8ac339fd98ed91af222f406479fae) Thanks [@pranaygp](https://github.com/pranaygp)! - Add `hook_conflict` event type for duplicate token detection
|
|
- World returns `hook_conflict` event when `hook_created` uses an existing token
|
|
- Add `HOOK_CONFLICT` error slug
|
|
|
|
- Updated dependencies [[`4966b72`](https://github.com/vercel/workflow/commit/4966b728a8c8ac339fd98ed91af222f406479fae), [`b16a682`](https://github.com/vercel/workflow/commit/b16a6828af36a2d5adb38fb6a6d1253657001ac8)]:
|
|
- @workflow/utils@4.1.0-beta.11
|
|
|
|
## 4.0.1-beta.13
|
|
|
|
### Patch Changes
|
|
|
|
- Updated dependencies [[`9b1640d`](https://github.com/vercel/workflow/commit/9b1640d76e7e759446058d65272011071bb250d2)]:
|
|
- @workflow/utils@4.0.1-beta.10
|
|
|
|
## 4.0.1-beta.12
|
|
|
|
### Patch Changes
|
|
|
|
- Updated dependencies [[`e3f0390`](https://github.com/vercel/workflow/commit/e3f0390469b15f54dee7aa9faf753cb7847a60c6)]:
|
|
- @workflow/utils@4.0.1-beta.9
|
|
|
|
## 4.0.1-beta.11
|
|
|
|
### Patch Changes
|
|
|
|
- Updated dependencies [[`0cf0ac3`](https://github.com/vercel/workflow/commit/0cf0ac32114bcdfa49319d27c2ce98da516690f1)]:
|
|
- @workflow/utils@4.0.1-beta.8
|
|
|
|
## 4.0.1-beta.10
|
|
|
|
### Patch Changes
|
|
|
|
- [#638](https://github.com/vercel/workflow/pull/638) [`4bdd3e5`](https://github.com/vercel/workflow/commit/4bdd3e5086a51a46898cca774533019d3ace77b3) Thanks [@VaguelySerious](https://github.com/VaguelySerious)! - Move auth error messages into @workflow/errors package
|
|
|
|
## 4.0.1-beta.9
|
|
|
|
### Patch Changes
|
|
|
|
- [#505](https://github.com/vercel/workflow/pull/505) [`b56aae3`](https://github.com/vercel/workflow/commit/b56aae3fe9b5568d7bdda592ed025b3499149240) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Override setTimeout, setInterval, and related functions in workflow VM context to throw helpful errors suggesting to use `sleep` instead
|
|
|
|
- Updated dependencies [[`1ef6b2f`](https://github.com/vercel/workflow/commit/1ef6b2fdc8dc7e4d665aa2fe1a7d9e68ce7f1e95)]:
|
|
- @workflow/utils@4.0.1-beta.7
|
|
|
|
## 4.0.1-beta.8
|
|
|
|
### Patch Changes
|
|
|
|
- Updated dependencies [[`c9b8d84`](https://github.com/vercel/workflow/commit/c9b8d843fd0a88de268d603a14ebe2e7c726169a)]:
|
|
- @workflow/utils@4.0.1-beta.6
|
|
|
|
## 4.0.1-beta.7
|
|
|
|
### Patch Changes
|
|
|
|
- Updated dependencies [bc9b628]
|
|
- Updated dependencies [34f3f86]
|
|
- Updated dependencies [cd451e0]
|
|
- @workflow/utils@4.0.1-beta.5
|
|
|
|
## 4.0.1-beta.6
|
|
|
|
### Patch Changes
|
|
|
|
- Updated dependencies [edb69c3]
|
|
- @workflow/utils@4.0.1-beta.4
|
|
|
|
## 4.0.1-beta.5
|
|
|
|
### Patch Changes
|
|
|
|
- b97b6bf: Lock all dependencies in our packages
|
|
- 00b0bb9: Wire through world's structured errors in WorkflowRunFailedError
|
|
- Updated dependencies [b97b6bf]
|
|
- @workflow/utils@4.0.1-beta.3
|
|
|
|
## 4.0.1-beta.4
|
|
|
|
### Patch Changes
|
|
|
|
- Updated dependencies [bf170ad]
|
|
- Updated dependencies [adf0cfe]
|
|
- @workflow/utils@4.0.1-beta.2
|
|
|
|
## 4.0.1-beta.3
|
|
|
|
### Patch Changes
|
|
|
|
- f973954: Update license to Apache 2.0
|
|
|
|
## 4.0.1-beta.2
|
|
|
|
### Patch Changes
|
|
|
|
- 796fafd: Add static `is()` methods to all Error subclasses
|
|
|
|
## 4.0.1-beta.1
|
|
|
|
### Patch Changes
|
|
|
|
- 1408293: Add "description" field to `package.json` file
|
|
- 8422a32: Update Workflow naming convention
|
|
- e46294f: Add "license" and "repository" fields to `package.json` file
|
|
|
|
## 4.0.1-beta.0
|
|
|
|
### Patch Changes
|
|
|
|
- fcf63d0: Initial publish
|