windmill-labs/windmill · error

Flow at path: ${path} doesn't exist

Error message

Flow at path: ${path} doesn't exist

What it means

loadSchedule first checks schedule existence with ScheduleService.existsSchedule for the given workspace and path. If the backend reports no schedule exists for that flow path, it throws this error instead of fetching, surfacing that the flow (or its schedule) is missing so the caller can react rather than receive a null schedule.

Source

Thrown at frontend/src/lib/components/flows/scheduleUtils.ts:17

import { ScheduleService, type Schedule, type TriggersCount } from '$lib/gen'
import type { ScheduleTrigger } from '../triggers'
import type { Writable } from 'svelte/store'
import { writable } from 'svelte/store'
import { get } from 'svelte/store'
import { sendUserToast } from '$lib/utils'
import { stateSnapshot } from '$lib/svelte5Utils.svelte'

// Load the schedule of a flow given its path and the workspace
export async function loadSchedule(path: string, workspace: string): Promise<ScheduleTrigger> {
	const existsSchedule = await ScheduleService.existsSchedule({
		workspace,
		path
	})

	if (!existsSchedule) {
		throw new Error(`Flow at path: ${path} doesn't exist`)
	}

	const schedule = await ScheduleService.getSchedule({
		workspace,
		path
	})

	return {
		summary: schedule.summary ?? undefined,
		enabled: schedule.enabled,
		cron: schedule.schedule,
		timezone: schedule.timezone,
		args: schedule.args ?? {}
	}
}

export async function loadSchedules(
	forceRefresh: boolean,

View on GitHub (pinned to e474e8803c)

Solutions

  1. Verify the flow path exists in the target workspace before loading its schedule.
  2. Refresh the schedules list after any delete/rename so stale paths are not requested.
  3. Handle the throw in the caller by removing the stale entry from the UI list instead of retrying.

Example fix

// before
const schedule = await loadSchedule(workspace, path)
// after
let schedule
try {
  schedule = await loadSchedule(workspace, path)
} catch {
  toast.info(`Flow ${path} no longer exists`)
  schedules = schedules.filter((s) => s.path !== path)
}
Defensive patterns

Strategy: try-catch

Validate before calling

const exists = await ScheduleService.existsSchedule({ workspace, path })
if (!exists) {
  toast.info(`No schedule for ${path}`)
  return
}

Try / catch

try {
  const schedule = await loadSchedule(workspace, path)
} catch (e) {
  if (String(e.message).includes("doesn't exist")) {
    removeStaleScheduleEntry(path)
    return
  }
  throw e
}

Prevention

When it happens

Trigger: Calling loadSchedule(workspace, path) where no schedule exists for path — the existsSchedule API returned false. Despite the message wording, it is the schedule existence check that fails.

Common situations: Flow was deleted or renamed while a schedules list page was open; typo in the flow path; schedule was unscheduled/deleted on another tab; workspace switched so the path belongs to a different workspace.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03). Data as JSON: /api/errors/2d39acc7d1bd7399. Report an issue: GitHub.