@@ -135,7 +135,8 @@ export function getWebRevivers(): Revivers {
135135 // Error family. The reducer side (see
136136 // `packages/core/src/serialization/reducers/common.ts`) emits a tagged
137137 // entry for each built-in Error subclass plus the workflow-specific
138- // `FatalError` / `RetryableError` and `AggregateError`. Without
138+ // `FatalError` / `RetryableError` / `HookConflictError` and
139+ // `AggregateError`. Without
139140 // matching revivers here, `devalue.unflatten` throws "Unknown type X"
140141 // — which surfaces in the web o11y UI as "Failed to load resource
141142 // details: Unknown type FatalError".
@@ -183,6 +184,20 @@ export function getWebRevivers(): Revivers {
183184 if ( value . stack !== undefined ) error . stack = value . stack ;
184185 return error ;
185186 } ,
187+ HookConflictError : ( value ) => {
188+ const opts = 'cause' in value ? { cause : value . cause } : undefined ;
189+ const error = new Error ( value . message , opts ) as Error & {
190+ token ?: string ;
191+ conflictingRunId ?: string ;
192+ } ;
193+ error . name = 'HookConflictError' ;
194+ error . token = value . token ;
195+ if ( value . conflictingRunId !== undefined ) {
196+ error . conflictingRunId = value . conflictingRunId ;
197+ }
198+ if ( value . stack !== undefined ) error . stack = value . stack ;
199+ return error ;
200+ } ,
186201 RetryableError : ( value ) => {
187202 const opts = 'cause' in value ? { cause : value . cause } : undefined ;
188203 const error = new Error ( value . message , opts ) as Error & {
0 commit comments