FlowiseAI/Flowise · error · InternalFlowiseError
Error: chatflowsController.deleteScheduleTriggerLogs - id no
Error message
Error: chatflowsController.deleteScheduleTriggerLogs - id not provided!
What it means
Thrown by deleteScheduleTriggerLogs when req.params?.id is falsy. The endpoint deletes selected trigger-log entries for a chatflow, so the chatflow id is mandatory even though the actual log ids arrive in the body. Returned as PRECONDITION_FAILED (412).
Source
Thrown at packages/server/src/controllers/chatflows/index.ts:393
StatusCodes.NOT_FOUND,
'Error: chatflowsController.getScheduleTriggerLogs - workspace not found!'
)
}
const page = req.query.page ? parseInt(String(req.query.page), 10) : undefined
const limit = req.query.limit ? parseInt(String(req.query.limit), 10) : undefined
const statusRaw = req.query.status
const status = Array.isArray(statusRaw) ? (statusRaw as any) : statusRaw ? (String(statusRaw) as any) : undefined
const result = await scheduleService.getTriggerLogs(req.params.id, workspaceId, { page, limit, status })
return res.json(result)
} catch (error) {
next(error)
}
}
const deleteScheduleTriggerLogs = async (req: Request, res: Response, next: NextFunction) => {
try {
if (!req.params?.id) {
throw new InternalFlowiseError(
StatusCodes.PRECONDITION_FAILED,
'Error: chatflowsController.deleteScheduleTriggerLogs - id not provided!'
)
}
const workspaceId = req.user?.activeWorkspaceId
if (!workspaceId) {
throw new InternalFlowiseError(
StatusCodes.NOT_FOUND,
'Error: chatflowsController.deleteScheduleTriggerLogs - workspace not found!'
)
}
const logIds: unknown = req.body?.logIds
if (!Array.isArray(logIds) || logIds.some((x) => typeof x !== 'string')) {
throw new InternalFlowiseError(StatusCodes.BAD_REQUEST, 'logIds must be a string[]')
}
const result = await scheduleService.deleteTriggerLogs(req.params.id, workspaceId, logIds as string[])
return res.json(result)
} catch (error) {View on GitHub (pinned to abe4a8601a)
Solutions
- Include the chatflow id in the path alongside the logIds body.
- Validate both id and logIds client-side before sending.
- Confirm the route declares :id.
Example fix
// before
fetch(`/api/v1/chatflows//schedule/logs`, { method: 'DELETE', body: JSON.stringify({ logIds }) })
// after
fetch(`/api/v1/chatflows/${encodeURIComponent(id)}/schedule/logs`, { method: 'DELETE', body: JSON.stringify({ logIds }) }) Defensive patterns
Strategy: validation
Validate before calling
function deleteTriggerLogs(id: string, logIds: string[]) {
if (!id) throw new Error('chatflow id required')
if (!Array.isArray(logIds) || logIds.some((x) => typeof x !== 'string')) throw new Error('logIds must be string[]')
return fetch(`/api/v1/chatflows/${encodeURIComponent(id)}/schedule/logs`, { method: 'DELETE', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ logIds }) })
} Type guard
const isStringArray = (v: unknown): v is string[] => Array.isArray(v) && v.every((x) => typeof x === 'string')
Try / catch
try { await deleteTriggerLogs(id, logIds) } catch (e) { if (e.statusCode === 412) throw new Error('provide a chatflow id') } Prevention
- Send both the path id and the body logIds.
- Validate id and logIds client-side.
- Confirm the route declares :id.
When it happens
Trigger: A DELETE request whose path lacks :id, regardless of whether the body carries valid logIds.
Common situations: Client focused on the body payload and forgot the path id, route mounted without :id, or a UI delete action fired before a chatflow was bound.
Related errors
- Error: chatflowsController.getScheduleStatus - id not provid
- Error: chatflowsController.getScheduleTriggerLogs - id not p
- Error: chatflowsController.toggleScheduleEnabled - id not pr
- Error: chatflowsController.checkIfChatflowHasChanged - lastU
- Error: chatflowsController.setWebhookSecret - id not provide
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/48156b7b898547a6.
Report an issue: GitHub.