{"record":{"id":"f6fbb73cad8d3b35","repo":"FlowiseAI/Flowise","slug":"error-chatflowscontroller-getschedulestatus-id","errorCode":null,"errorMessage":"Error: chatflowsController.getScheduleStatus - id not provided!","messagePattern":"Error: chatflowsController\\.getScheduleStatus - id not provided!","errorType":"exception","errorClass":"InternalFlowiseError","httpStatus":412,"severity":"error","filePath":"packages/server/src/controllers/chatflows/index.ts","lineNumber":343,"sourceCode":"                StatusCodes.PRECONDITION_FAILED,\n                `Error: chatflowsController.clearWebhookSecret - id not provided!`\n            )\n        }\n        const workspaceId = req.user?.activeWorkspaceId\n        if (!workspaceId) {\n            throw new InternalFlowiseError(StatusCodes.UNAUTHORIZED, `Error: chatflowsController.clearWebhookSecret - workspace not found!`)\n        }\n        await chatflowsService.clearWebhookSecret(req.params.id, workspaceId)\n        return res.sendStatus(StatusCodes.NO_CONTENT)\n    } catch (error) {\n        next(error)\n    }\n}\n\nconst getScheduleStatus = async (req: Request, res: Response, next: NextFunction) => {\n    try {\n        if (!req.params?.id) {\n            throw new InternalFlowiseError(\n                StatusCodes.PRECONDITION_FAILED,\n                'Error: chatflowsController.getScheduleStatus - id not provided!'\n            )\n        }\n        const workspaceId = req.user?.activeWorkspaceId\n        if (!workspaceId) {\n            throw new InternalFlowiseError(StatusCodes.NOT_FOUND, 'Error: chatflowsController.getScheduleStatus - workspace not found!')\n        }\n        const status = await scheduleService.getScheduleStatus(req.params.id, workspaceId)\n        return res.json({\n            enabled: status.record?.enabled ?? false,\n            canEnable: status.canEnable,\n            reason: status.reason,\n            record: status.record\n        })\n    } catch (error) {\n        next(error)\n    }","sourceCodeStart":325,"sourceCodeEnd":361,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/server/src/controllers/chatflows/index.ts#L325-L361","documentation":"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.","triggerScenarios":"GET to the schedule-status route with the :id segment missing or empty, or a route registration that omits :id.","commonSituations":"UI loads the schedule panel before a chatflow is selected (id is null), or a deep link with a missing id segment.","solutions":["Pass a valid chatflow id in the path.","On the client, gate the schedule-status fetch behind a non-empty selected chatflow id.","Verify the route declares :id."],"exampleFix":"// before\nif (selectedTab === 'schedule') fetchScheduleStatus()\n// after\nif (selectedTab === 'schedule' && chatflowId) fetchScheduleStatus(chatflowId)","handlingStrategy":"validation","validationCode":"function fetchScheduleStatus(id: string) {\n  if (!id) throw new Error('chatflow id required to read schedule status')\n  return fetch(`/api/v1/chatflows/${encodeURIComponent(id)}/schedule/status`)\n}","typeGuard":"const isNonEmptyString = (v: unknown): v is string => typeof v === 'string' && v.trim().length > 0","tryCatchPattern":"try { await fetchScheduleStatus(id) } catch (e) { if (e.statusCode === 412) throw new Error('provide a chatflow id') }","preventionTips":["Load the schedule panel only after a chatflow is selected.","Validate id presence client-side.","Confirm the route declares :id."],"tags":["flowise","controller","validation","precondition-failed","path-param","scheduling","typescript"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}