{"record":{"id":"31fc655338d34110","repo":"windmill-labs/windmill","slug":"flow-flowpath-not-found","errorCode":null,"errorMessage":"Flow ${flowPath} not found","messagePattern":"Flow (.+?) not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/src/commands/flow/flow.ts","lineNumber":1233,"sourceCode":"  .option(\"--json\", \"Output as JSON (for piping to jq)\")\n  .action(history as any)\n  .command(\"show-version\", \"Show a specific version of a flow\")\n  .arguments(\"<path:string> <version:string>\")\n  .option(\"--json\", \"Output as JSON (for piping to jq)\")\n  .action(showVersion as any)\n  .command(\n    \"set-permissioned-as\",\n    \"Set the on_behalf_of_email for a flow (requires admin or wm_deployers group)\"\n  )\n  .arguments(\"<path:string> <email:string>\")\n  .action((async (opts: any, flowPath: string, email: string) => {\n    const workspace = await resolveWorkspace(opts);\n    await requireLogin(opts);\n    const remote = await wmill.getFlowByPath({\n      workspace: workspace.workspaceId,\n      path: flowPath,\n    });\n    if (!remote) throw new Error(`Flow ${flowPath} not found`);\n    await wmill.updateFlow({\n      workspace: workspace.workspaceId,\n      path: flowPath,\n      requestBody: {\n        ...remote,\n        path: flowPath,\n        on_behalf_of_email: email,\n        // Derived server-side; see the script command for why.\n        on_behalf_of: undefined,\n        preserve_on_behalf_of: true,\n        // Preserve any user draft at this path (see backend skip_draft_deletion).\n        skip_draft_deletion: true,\n      } as any,\n    });\n    log.info(colors.green(`Updated permissioned_as for flow ${flowPath} to ${email}`));\n  }) as any);\n\nexport default command;","sourceCodeStart":1215,"sourceCodeEnd":1251,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/cli/src/commands/flow/flow.ts#L1215-L1251","documentation":"During a flow metadata/lock regeneration operation the CLI fetches the flow by path with `wmill.getFlowByPath`; if the API returns nothing (flow absent on the server), it throws this not-found error instead of proceeding to update.","triggerScenarios":"Running a flow command that updates/regenerates metadata against a path that does not exist remotely — e.g. pushing locks for a flow that was renamed or deleted on the server, or a path typo / wrong workspace.","commonSituations":"Deploying to a fresh workspace where the flow was never pushed; flow deleted by a teammate; active workspace switched with `wmill workspace switch`; case-sensitive path mismatch.","solutions":["Verify the flow exists in the target workspace (web UI or `wmill flow list`)","Check the active workspace with `wmill workspace` and switch if needed","Push the flow first (`wmill flow push`) so it exists before regenerating locks","Correct any path typo, matching exact case"],"exampleFix":"// before\nwmill flow generate-locks u/admin/etl_flow   # flow not on server\n// after\nwmill flow push u/admin/etl_flow && wmill flow generate-locks u/admin/etl_flow","handlingStrategy":"validation","validationCode":"const remote = await wmill.getFlowByPath({ workspace: ws.workspaceId, path: flowPath });\nif (!remote) throw new Error(`Flow ${flowPath} missing on ${ws.workspaceId}; push it first`);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always push flows before regenerating locks","Confirm the active workspace with `wmill workspace` in deploy scripts","Keep flow paths in a single source of truth (manifest) to avoid typos","Treat path as case-sensitive everywhere"],"tags":["cli","not-found","flow"],"backgroundTag":"resource-not-found","analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}