21 KiB
@workflow/errors
5.0.0-beta.21
Minor Changes
- #3787
61fb1f9Thanks @VaguelySerious! - Add anexperimental_retentionoption tostart():experimental_retention: 0asks the World to delete the run's user data as soon as the run completes or fails, while keeping the run itself listable. Implemented on the Vercel, Postgres and Local Worlds. Reading a run whose data has expired now throwsRunExpiredErrorinstead of resolving to a placeholder.
5.0.0-beta.20
Minor Changes
-
#3943
fbfb9feThanks @karthikscale3! - Validateworld.analyticsarguments up front: an invalid id, an out-of-range page limit, an oversized attribute filter, or a half-openstartTime/endTimewindow now throws aWorkflowWorldErrorwithcode: 'INVALID_ARGUMENT'andfieldset to the offending parameter, instead of failing the request. The message names the method, the parameter, and what it received. AddsANALYTICS_RUN_SCOPED_PAGE_LIMIT,ANALYTICS_PAGE_LIMITandANALYTICS_MAX_ATTRIBUTE_FILTERS.Deprecate
analytics.events.listByCorrelationId()in favour ofanalytics.events.list({ runId, correlationId }).Fix
analytics.attributes.list()timestamps being shifted by the local UTC offset. -
#3850
fe2fd8cThanks @alangenfeld! - Add a catchableStreamErrorand classify Workflow stream infrastructure failures asSTREAM_ERRORinstead ofUSER_ERROR.
5.0.0-beta.19
Patch Changes
- Updated dependencies [
ffc5807]:- @workflow/utils@5.0.0-beta.10
5.0.0-beta.18
Patch Changes
5.0.0-beta.17
Patch Changes
-
#3479
b589460Thanks @VaguelySerious! - Replay-context event writes now always report the log position they replayed from, and theWORKFLOW_PRECONDITION_GUARDflag is removed. -
#3410
c1a5c74Thanks @alangenfeld! - Surface typed terminal errors when stream retention expires.
5.0.0-beta.16
Minor Changes
- #2960
79e4c04Thanks @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 newDEPLOYMENT_MISMATCHerror code once the recovery budget is spent.
5.0.0-beta.15
Minor Changes
- #3145
1471f25Thanks @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-localand@workflow/world-postgresdo not implement the check.
5.0.0-beta.14
Patch Changes
- Updated dependencies [
a09d001]:- @workflow/utils@5.0.0-beta.8
5.0.0-beta.13
Patch Changes
-
#3061
62d570eThanks @NathanColosimo! - Remove the retired step route runtime and make queue health checks target the combined flow handler. -
Updated dependencies [
49276f2,62d570e]:- @workflow/utils@5.0.0-beta.7
5.0.0-beta.12
Patch Changes
-
#2986
fe12b84Thanks @shalabhc! - Enforce a server-supplied per-run event limit (default 25K) -
#2946
eb8fdb9Thanks @VaguelySerious! - TheWORKFLOW_PRECONDITION_GUARDevent-creation guard is now on by default; opt out withWORKFLOW_PRECONDITION_GUARD=0.
5.0.0-beta.11
Minor Changes
- #2266
a00d169Thanks @VaguelySerious! - Add an opt-in optimistic-concurrency guard for event creation (WORKFLOW_PRECONDITION_GUARD=1): replay-context event creations send astateUpdatedAtsnapshot 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 412PreconditionFailedError.
5.0.0-beta.10
Patch Changes
5.0.0-beta.9
Patch Changes
- Updated dependencies [
f6772d9]:- @workflow/utils@5.0.0-beta.5
5.0.0-beta.8
Patch Changes
- Updated dependencies [
926a5e7]:- @workflow/utils@5.0.0-beta.4
5.0.0-beta.7
Patch Changes
- #2212
2a3b11bThanks @pranaygp! - Retry transient workflow replay divergence before classifying repeated divergence as a corrupted event log.
5.0.0-beta.6
Patch Changes
- #2145
8d0928bThanks @TooTallNate! - Classify SDK-level AES-GCM encryption failures asRUNTIME_ERRORinstead ofUSER_ERRORvia a newRuntimeDecryptionError.
5.0.0-beta.5
Patch Changes
-
#1799
503a929Thanks @TooTallNate! - Use inline sourcemaps for all workspace packages; published packages no longer ship external.js.mapfiles. -
Updated dependencies [
503a929]:- @workflow/utils@5.0.0-beta.3
5.0.0-beta.4
Patch Changes
-
#2046
ad71b58Thanks @pranaygp! - Report corrupted event logs with a distinctCorruptedEventLogErrortype andCORRUPTED_EVENT_LOGrun error code. -
#2060
1d3959eThanks @pranaygp! - Record fatal world response contract failures as non-retryable workflow errors.
5.0.0-beta.3
Patch Changes
5.0.0-beta.2
Major Changes
- #1851
5f22832Thanks @TooTallNate! - BREAKING CHANGE: Run and step errors are now serialized through the workflow serialization pipeline, preserving original class identity and cause chains onWorkflowRunFailedError.cause. Pre-upgrade failed runs in theworld-postgreslegacyerrortext column surface aserror: undefinedon read; the original payload is still readable directly from theerrorJsoncolumn for manual inspection.
Patch Changes
-
#1915
540a2efThanks @VaguelySerious! - Replace thechalkimport in@workflow/errors/ansiwith a tiny inline ANSI shim.@workflow/errors/ansiis reachable from the workflow-VM bundle (via@workflow/core/workflow→context-errors→context-violation-error→ here), andchalkpulls insupports-color, which callsrequire('os')at module load — crashing every workflow withReferenceError: require is not definedin the sandboxed VM. -
#1849
1203daeThanks @pranaygp! - Friendlier workflow error messages. NewSerializationError,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 withfatal: trueso context violations and serialization failures now fail fast instead of burning retry attempts. Runtime logs are namespaced under[workflow-sdk]and gainerrorAttribution(uservssdk) plus class-aware hints -
#1849
1203daeThanks @pranaygp! - Replaceutil.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]:- @workflow/utils@5.0.0-beta.2
5.0.0-beta.1
Patch Changes
-
#1769
5a42964Thanks @tomdale! - Embed source content in published sourcemaps. -
#1759
173756dThanks @TooTallNate! - Renameuseworkflow.devURLs toworkflow-sdk.dev -
Updated dependencies [
5a42964,173756d]:- @workflow/utils@5.0.0-beta.1
5.0.0-beta.0
Major Changes
- #1642
c5cdfc0Thanks @VaguelySerious! - Initial v5 beta release
Patch Changes
- Updated dependencies [
c5cdfc0]:- @workflow/utils@5.0.0-beta.0
4.1.0-beta.20
Patch Changes
- #1567
6dc1b78Thanks @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
73a851aThanks @pranaygp! - AddHookConflictErrorto@workflow/errorsand use it for hook token conflicts instead ofWorkflowRuntimeError -
#1340
84599b7Thanks @pranaygp! - Add error code classification (USER_ERROR,RUNTIME_ERROR) torun_failedevents, improve queue and schema validation error logging -
#1447
2ef33d2Thanks @pranaygp! - Export semantic error types fromworkflow/internal/errorsand add API reference documentation -
#1452
672d919Thanks @pranaygp! - Fix workflow/step not found errors to fail gracefully instead of causing infinite queue retries -
#1344
beccbc4Thanks @pranaygp! - Remove VQS maxDeliveries cap and enforce max delivery limit in workflow/step handlers with graceful failure -
#1342
aee035fThanks @pranaygp! - Replace HTTP status code checks with semantic error types (EntityConflictError, RunExpiredError, ThrottleError, TooEarlyError). BREAKING CHANGE:WorkflowAPIErrorrenamed toWorkflowWorldError.
4.1.0-beta.18
Patch Changes
- #1270
adfe8b6Thanks @pranaygp! - AddHookNotFoundErrorto@workflow/errorsand adopt it across all world backends
4.1.0-beta.17
Patch Changes
- Updated dependencies [
e55c636]:- @workflow/utils@4.1.0-beta.13
4.1.0-beta.16
Patch Changes
- #1055
c2b4fe9Thanks @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
56f2221Thanks @VaguelySerious! - Add 429 throttle retry handling and 500 server error retry with exponential backoff to the workflow and step runtimes -
Updated dependencies [
3d770d5]:- @workflow/utils@4.1.0-beta.12
4.1.0-beta.14
Minor Changes
- #621
4966b72Thanks @pranaygp! - BREAKING: Storage interface is now read-only; all mutations go throughevents.create()- Remove
cancel,pause,resumefromruns - Remove
create,updatefromruns,steps,hooks - Add run lifecycle events:
run_created,run_started,run_completed,run_failed,run_cancelled - Add
step_createdevent type - Remove
fatalfield fromstep_failed(terminal failure is now implicit) - Add
step_retryingevent with error info for retriable failures
- Remove
Patch Changes
-
#621
4966b72Thanks @pranaygp! - Add backwards compatibility for runs created with different spec versions- Add
RunNotSupportedErrorfor 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 runwait_completed: store event only (no entity mutation)- Unknown legacy events: throw error
- Add
-
#621
4966b72Thanks @pranaygp! - Addhook_conflictevent type for duplicate token detection- World returns
hook_conflictevent whenhook_createduses an existing token - Add
HOOK_CONFLICTerror slug
- World returns
-
Updated dependencies [
4966b72,b16a682]:- @workflow/utils@4.1.0-beta.11
4.0.1-beta.13
Patch Changes
- Updated dependencies [
9b1640d]:- @workflow/utils@4.0.1-beta.10
4.0.1-beta.12
Patch Changes
- Updated dependencies [
e3f0390]:- @workflow/utils@4.0.1-beta.9
4.0.1-beta.11
Patch Changes
- Updated dependencies [
0cf0ac3]:- @workflow/utils@4.0.1-beta.8
4.0.1-beta.10
Patch Changes
- #638
4bdd3e5Thanks @VaguelySerious! - Move auth error messages into @workflow/errors package
4.0.1-beta.9
Patch Changes
-
#505
b56aae3Thanks @copilot-swe-agent! - Override setTimeout, setInterval, and related functions in workflow VM context to throw helpful errors suggesting to usesleepinstead -
Updated dependencies [
1ef6b2f]:- @workflow/utils@4.0.1-beta.7
4.0.1-beta.8
Patch Changes
- Updated dependencies [
c9b8d84]:- @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 packages00b0bb9: 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
4.0.1-beta.3
Patch Changes
f973954: Update license to Apache 2.0
4.0.1-beta.2
Patch Changes
796fafd: Add staticis()methods to all Error subclasses
4.0.1-beta.1
Patch Changes
- 1408293: Add "description" field to
package.jsonfile - 8422a32: Update Workflow naming convention
- e46294f: Add "license" and "repository" fields to
package.jsonfile
4.0.1-beta.0
Patch Changes
- fcf63d0: Initial publish