FlowiseAI/Flowise · error · InternalFlowiseError

Error: chatflowsController.getScheduleStatus - id not provid

Error message

Error: chatflowsController.getScheduleStatus - id not provided!

What it means

Thrown by getScheduleStatus when req.params?.id is falsy. This endpoint reports whether a scheduled trigger is enabled for a chatflow, so a chatflow id is mandatory. Returned as PRECONDITION_FAILED (412). The optional-chaining on req.params mirrors Flowise's defensive style across controllers.

Source

Thrown at packages/server/src/controllers/chatflows/index.ts:343

                StatusCodes.PRECONDITION_FAILED,
                `Error: chatflowsController.clearWebhookSecret - id not provided!`
            )
        }
        const workspaceId = req.user?.activeWorkspaceId
        if (!workspaceId) {
            throw new InternalFlowiseError(StatusCodes.UNAUTHORIZED, `Error: chatflowsController.clearWebhookSecret - workspace not found!`)
        }
        await chatflowsService.clearWebhookSecret(req.params.id, workspaceId)
        return res.sendStatus(StatusCodes.NO_CONTENT)
    } catch (error) {
        next(error)
    }
}

const getScheduleStatus = async (req: Request, res: Response, next: NextFunction) => {
    try {
        if (!req.params?.id) {
            throw new InternalFlowiseError(
                StatusCodes.PRECONDITION_FAILED,
                'Error: chatflowsController.getScheduleStatus - id not provided!'
            )
        }
        const workspaceId = req.user?.activeWorkspaceId
        if (!workspaceId) {
            throw new InternalFlowiseError(StatusCodes.NOT_FOUND, 'Error: chatflowsController.getScheduleStatus - workspace not found!')
        }
        const status = await scheduleService.getScheduleStatus(req.params.id, workspaceId)
        return res.json({
            enabled: status.record?.enabled ?? false,
            canEnable: status.canEnable,
            reason: status.reason,
            record: status.record
        })
    } catch (error) {
        next(error)
    }

View on GitHub (pinned to abe4a8601a)

Solutions

  1. Pass a valid chatflow id in the path.
  2. On the client, gate the schedule-status fetch behind a non-empty selected chatflow id.
  3. Verify the route declares :id.

Example fix

// before
if (selectedTab === 'schedule') fetchScheduleStatus()
// after
if (selectedTab === 'schedule' && chatflowId) fetchScheduleStatus(chatflowId)
Defensive patterns

Strategy: validation

Validate before calling

function fetchScheduleStatus(id: string) {
  if (!id) throw new Error('chatflow id required to read schedule status')
  return fetch(`/api/v1/chatflows/${encodeURIComponent(id)}/schedule/status`)
}

Type guard

const isNonEmptyString = (v: unknown): v is string => typeof v === 'string' && v.trim().length > 0

Try / catch

try { await fetchScheduleStatus(id) } catch (e) { if (e.statusCode === 412) throw new Error('provide a chatflow id') }

Prevention

When it happens

Trigger: GET to the schedule-status route with the :id segment missing or empty, or a route registration that omits :id.

Common situations: UI loads the schedule panel before a chatflow is selected (id is null), or a deep link with a missing id segment.

Related errors


AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12). Data as JSON: /api/errors/f6fbb73cad8d3b35. Report an issue: GitHub.