i believe there are two different scopes at play here. step scoped code gets retried when an error h

i believe there are two different scopes at play here. step scoped code gets retried when an error happens. but workflow scoped code does not have this. below is the abstract class i am talking about and the catch part here works only once.
` export abstract class AbstractWorkflow<T, R> extends WorkflowEntrypoint<Env, T> { protected abstract getName(): string; protected abstract validateInput(input: T): void; protected abstract runStep(event: WorkflowEvent<T>, step: WorkflowStep): Promise<R>; async run(event: WorkflowEvent<T>, step: WorkflowStep): Promise<unknown> { console.log({ message: `${this.getName()} started.`, level: "info", event, }); try { this.validateInput(event.payload); const output = await this.runStep(event, step); console.log({ message: `${this.getName()} completed.`, level: "info", event, output, }); return output; } catch (error) { console.log({ message: `${this.getName()} failed.`, level: "error", event, error, }); throw error; } } }
Was this page helpful?