FlowiseAI/Flowise · error · InternalFlowiseError
Error: chatflowsController.checkIfChatflowHasChanged - lastU
Error message
Error: chatflowsController.checkIfChatflowHasChanged - lastUpdatedDateTime not provided!
What it means
Thrown by checkIfChatflowHasChanged when the request path is missing the lastUpdatedDateTime segment. Flowise uses this endpoint so clients can poll whether a chatflow changed since a known timestamp; without the timestamp the comparison is meaningless. It is a guard inside the controller (PRECONDITION_FAILED / 412) thrown as an InternalFlowiseError and forwarded to Express error middleware via next(error).
Source
Thrown at packages/server/src/controllers/chatflows/index.ts:283
)
}
const apiResponse = await chatflowsService.getSinglePublicChatbotConfig(req.params.id)
return res.json(apiResponse)
} catch (error) {
next(error)
}
}
const checkIfChatflowHasChanged = async (req: Request, res: Response, next: NextFunction) => {
try {
if (typeof req.params === 'undefined' || !req.params.id) {
throw new InternalFlowiseError(
StatusCodes.PRECONDITION_FAILED,
`Error: chatflowsController.checkIfChatflowHasChanged - id not provided!`
)
}
if (!req.params.lastUpdatedDateTime) {
throw new InternalFlowiseError(
StatusCodes.PRECONDITION_FAILED,
`Error: chatflowsController.checkIfChatflowHasChanged - lastUpdatedDateTime not provided!`
)
}
const workspaceId = req.user?.activeWorkspaceId
if (!workspaceId) {
throw new InternalFlowiseError(
StatusCodes.NOT_FOUND,
'Error: chatflowsController.checkIfChatflowHasChanged - active workspace ID not found!'
)
}
const apiResponse = await chatflowsService.checkIfChatflowHasChanged(req.params.id, req.params.lastUpdatedDateTime, workspaceId)
return res.json(apiResponse)
} catch (error) {
next(error)
}
}
View on GitHub (pinned to abe4a8601a)
Solutions
- Include lastUpdatedDateTime as a path segment matching the route definition (e.g. GET /api/v1/chatflows/<id>/chatflow-changed/<lastUpdatedDateTime>).
- If you control the route, verify the Express router declares :lastUpdatedDateTime in the path string; otherwise the param is always undefined regardless of client input.
- If the value belongs in the query string or body, change the controller to read req.query.lastUpdatedDateTime / req.body.lastUpdatedDateTime instead of req.params.
Example fix
// before - client omits the timestamp
const r = await fetch(`/api/v1/chatflows/${id}/chatflow-changed`)
// after - include the last-known timestamp as a path param
const r = await fetch(`/api/v1/chatflows/${id}/chatflow-changed/${encodeURIComponent(lastUpdatedDateTime)}`) Defensive patterns
Strategy: validation
Validate before calling
function buildChangeCheckUrl(id: string, lastUpdatedDateTime: string): string {
if (!id) throw new Error('chatflow id required')
if (!lastUpdatedDateTime) throw new Error('lastUpdatedDateTime required')
return `/api/v1/chatflows/${encodeURIComponent(id)}/chatflow-changed/${encodeURIComponent(lastUpdatedDateTime)}`
} Type guard
const isNonEmptyString = (v: unknown): v is string => typeof v === 'string' && v.trim().length > 0
Try / catch
try {
const r = await fetch(buildChangeCheckUrl(id, ts))
if (!r.ok) throw await r.json()
} catch (e) {
// 412 here means a path param is missing - re-derive id/ts and retry once
if (e.statusCode === 412) console.error('missing path param', e.message)
} Prevention
- Derive request URLs from validated non-empty id/timestamp values only.
- Confirm the Express route declares every param the controller reads.
- Unit-test the controller with supertest passing all required params.
When it happens
Trigger: A GET request to the chatflow-change-check route whose path does not include the :lastUpdatedDateTime param, e.g. calling /api/v1/chatflows/:id/... without the timestamp segment, or hitting a route definition that omits the param so req.params.lastUpdatedDateTime resolves to undefined.
Common situations: Frontend was upgraded to a newer API contract that renamed/removed the segment; a custom integration or curl call that omitted the timestamp; a route misconfiguration where the Express router forgot to declare :lastUpdatedDateTime so the value is always undefined even when the client sent it in the body.
Related errors
- Error: chatflowsController.setWebhookSecret - id not provide
- Error: chatflowsController.clearWebhookSecret - id not provi
- Error: chatflowsController.getScheduleStatus - id not provid
- Error: chatflowsController.getScheduleTriggerLogs - id not p
- Error: chatflowsController.deleteScheduleTriggerLogs - id no
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/03c15a46d0cb01f0.
Report an issue: GitHub.