Skip to content

Commit ba58dd8

Browse files
authored
Fix decisionTaskTimedOutEventSchema parse (#877)
Fix decisionTaskTimedOutEventSchema parse
1 parent d62cd83 commit ba58dd8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils/data-formatters/schema/history-event-schema.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,11 +294,11 @@ export const decisionTaskTimedOutEventSchema = historyEventBaseSchema.extend({
294294
attributes: z.literal('decisionTaskTimedOutEventAttributes'),
295295
decisionTaskTimedOutEventAttributes: z.object({
296296
scheduledEventId: z.string(),
297-
startedEventId: z.string(),
297+
startedEventId: z.coerce.string(), // coerce to string to avoid protoLoader issue of 0 as a number, this happens when reset workflow to decision started event.
298298
timeoutType: timeoutTypeSchema,
299299
baseRunId: z.string(),
300300
newRunId: z.string(),
301-
forkEventVersion: z.string(),
301+
forkEventVersion: z.coerce.string(),
302302
reason: z.string(),
303303
cause: decisionTaskTimedOutCauseSchema,
304304
requestId: z.string(),

0 commit comments

Comments
 (0)