Skip to content

throwing in onComplete mutation, doesn't fail the workflow #41

@adamk-au

Description

@adamk-au
const workflowId: WorkflowId = await workflow.start(
  ctx,
  internal.example.myExample,
  {
    onComplete: internal.example.handleOnComplete,
  },
);

export const handleOnComplete = internalMutation({
  args: {
    workflowId: vWorkflowId,
    result: vResultValidator,
    context: v.any(),
  },
  handler: async (ctx, args) => {
    throw new Error('error in handleOnComplete'); // Expect to see in `onCompleteFailures` component table
  },
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions