FlowiseAI/Flowise · error · InternalFlowiseError
Error: chatflowsController.checkIfChatflowIsValidForStreamin
Error message
Error: chatflowsController.checkIfChatflowIsValidForStreaming - id not provided!
What it means
Thrown by checkIfChatflowIsValidForStreaming when req.params.id is undefined or empty. It is a guard at the top of the handler returning PRECONDITION_FAILED (412). No auth/workspace context is required for this check — only the route parameter.
Source
Thrown at packages/server/src/controllers/chatflows/index.ts:23
import { WorkspaceUserErrorMessage, WorkspaceUserService } from '../../enterprise/services/workspace-user.service'
import { InternalFlowiseError } from '../../errors/internalFlowiseError'
import { ChatflowType } from '../../Interface'
import { ScheduleBeat } from '../../schedule/ScheduleBeat'
import apiKeyService from '../../services/apikey'
import chatflowsService from '../../services/chatflows'
import scheduleService from '../../services/schedule'
import { GeneralErrorMessage } from '../../utils/constants'
import { getRunningExpressApp } from '../../utils/getRunningExpressApp'
import { getPageAndLimitParams } from '../../utils/pagination'
import { checkUsageLimit } from '../../utils/quotaUsage'
import { RateLimiterManager } from '../../utils/rateLimit'
import { sanitizeFlowDataForPublicEndpoint } from '../../utils/sanitizeFlowData'
import { stripProtectedFields } from '../../utils/stripProtectedFields'
const checkIfChatflowIsValidForStreaming = async (req: Request, res: Response, next: NextFunction) => {
try {
if (typeof req.params === 'undefined' || !req.params.id) {
throw new InternalFlowiseError(
StatusCodes.PRECONDITION_FAILED,
`Error: chatflowsController.checkIfChatflowIsValidForStreaming - id not provided!`
)
}
const apiResponse = await chatflowsService.checkIfChatflowIsValidForStreaming(req.params.id)
return res.json(apiResponse)
} catch (error) {
next(error)
}
}
const checkIfChatflowIsValidForUploads = async (req: Request, res: Response, next: NextFunction) => {
try {
if (typeof req.params === 'undefined' || !req.params.id) {
throw new InternalFlowiseError(
StatusCodes.PRECONDITION_FAILED,
`Error: chatflowsController.checkIfChatflowIsValidForUploads - id not provided!`
)View on GitHub (pinned to abe4a8601a)
Solutions
- Verify the request URL has a non-empty id segment.
- Confirm client variable feeding the URL is defined before the call.
- Check the route registration file uses param name `id` matching the controller.
Example fix
// before
await api.get(`/api/v1/chatflows/${undefined}/valid-for-streaming`)
// after
if (!chatflowId) throw new Error('chatflowId required')
await api.get(`/api/v1/chatflows/${chatflowId}/valid-for-streaming`) Defensive patterns
Strategy: validation
Validate before calling
if (!id || typeof id !== 'string' || id.length === 0) {
throw new Error('chatflow id required before checking streaming validity')
} Type guard
function isNonEmptyId(v: unknown): v is string {
return typeof v === 'string' && v.trim().length > 0
} Prevention
- Gate every endpoint call behind a non-empty id check.
- Keep a typed wrapper for each chatflow endpoint that asserts the id first.
- Confirm route param names match the controller when upgrading Flowise.
When it happens
Trigger: GET /api/v1/chatflows/:id/valid-for-streaming called without a real id segment, or with the id path param named differently (e.g. :chatflowId) than the controller reads.
Common situations: Client builds the URL with an undefined chatflowId variable; route renamed in a server version but client SDK not updated; copy-paste from a different endpoint that uses a different param name.
Related errors
- Error: chatMessagesController.abortChatMessage - chatflowid
- Error: chatflowsController.checkIfChatflowIsValidForUploads
- Error: chatflowsController.deleteChatflow - id not provided!
- Error: chatflowsController.getChatflowByApiKey - apikey not
- Error: chatflowsController.getChatflowById - id not provided
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/dcc18304d11b6f76.
Report an issue: GitHub.