Invalid path in step

I'm getting an error I am having a hard time interpreting:

ERROR [2025-04-30 08:27:49.458 -0700] (WORKFLOW - ExecutionEngine): Error executing step: Error: Invalid path content in step expandProductDetailsWorkflow at Object.execute (file:///Users/peterbrown/Development/already-app/node_modules/.pnpm/@mastra+core@0.9.1-alpha.8_react@19.1.0_zod@3.24.2/node_modules/@mastra/core/dist/workflows/vNext/index.js:756:21) at DefaultExecutionEngine.executeStep (file:///Users/peterbrown/Development/already-app/node_modules/.pnpm/@mastra+core@0.9.1-alpha.8_react@19.1.0_zod@3.24.2/node_modules/@mastra/core/dist/workflows/vNext/index.js:176:35)
which is because of this:

.branch([ [ async ({ getStepResult }) => getStepResult(classifyContent).classification === "product_page", expandProductDetailsWorkflow, ], ]) .map({ url: { step: fetchUrlWorkflow, path: "url", }, content: { step: expandProductDetailsWorkflow, path: "content", }, })

I'm stuck on how I should map the results of a branch like this. Or a branch with multiple conditions that map to different steps, but where I need the output to be mapped from whichever step was executed.
Was this page helpful?