You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(web-shared): hydrate FatalError/RetryableError and Error subclasses in o11y (vercel#1942)
* fix(web-shared): hydrate FatalError/RetryableError and Error subclasses in o11y
The web o11y reviver set was missing entries for the recently-added
serialization types (FatalError, RetryableError, the built-in Error
subclasses, AggregateError, DOMException), causing devalue.unflatten to
throw "Unknown type X" and the UI to surface "Failed to load resource
details" whenever a step or run failed with one of these error types.
Adds the missing revivers to getWebRevivers() and a regression test that
round-trips real values through the runtime's dehydrateStepError back
through the web reviver set.
* fix(web-shared): address review feedback on error revivers
- Pass `cause` through ErrorOptions to the subclass constructor instead of
assigning afterwards, matching `getCommonRevivers` in core. This gives
the resulting `cause` property the same engine-set, non-enumerable
semantics as a freshly thrown Error in the consumer realm.
- Guard `RetryableError.retryAfter` against missing/undefined values from
older runtime payloads — without it, `new Date(undefined)` produces an
Invalid Date rather than the property being absent. Add a defensive
test that drives the reviver directly with a payload missing the field.
Fix "Unknown type FatalError" / "Failed to load resource details" in the o11y UI by adding the missing reviver entries (`FatalError`, `RetryableError`, the built-in `Error` subclasses, `AggregateError`, and `DOMException`) to `getWebRevivers()` so it stays in sync with the runtime reducer set.
0 commit comments