mirror of
https://github.com/vercel/workflow.git
synced 2026-09-14 19:59:43 +08:00
e7ea0684f4
* Add first-class serialization for built-in Error subclasses Replace the generic Error reducer/reviver with specific handlers for TypeError, RangeError, SyntaxError, URIError, ReferenceError, EvalError, and AggregateError. Preserve the cause property on all Error types, only serializing it when present to maintain absence vs presence semantics. * Refactor Error subclass reducers/revivers with helper functions Extract repetitive reducer/reviver logic into makeErrorSubclassReducer and makeErrorSubclassReviver helpers. Reduces ~120 lines of duplicated code to ~50 while preserving identical behavior. AggregateError remains as a wrapping extension since it needs to preserve the errors array. * Bump error-subclass-serialization changeset to minor Adding new serialization support for built-in Error subclasses is a feature, not a bug fix.
258 B
258 B
@workflow/core
| @workflow/core |
|---|
| minor |
Add first-class serialization support for built-in Error subclasses (TypeError, RangeError, SyntaxError, URIError, ReferenceError, EvalError, AggregateError) and preserve the cause property on all Error types