FlowiseAI/Flowise · error · InternalFlowiseError
Error: chatflowsController.getSinglePublicChatflow - id not
Error message
Error: chatflowsController.getSinglePublicChatflow - id not provided!
What it means
Thrown by getSinglePublicChatflow when req.params.id is missing. PRECONDITION_FAILED (412) guard at the top of a public endpoint that may run without an authenticated user. After this check, the controller fetches the chatflow and gates visibility on chatflow.isPublic and workspace membership.
Source
Thrown at packages/server/src/controllers/chatflows/index.ts:233
const updateChatFlow = new ChatFlow()
Object.assign(updateChatFlow, stripProtectedFields(body))
updateChatFlow.id = chatflow.id
const rateLimiterManager = RateLimiterManager.getInstance()
await rateLimiterManager.updateRateLimiter(updateChatFlow)
const apiResponse = await chatflowsService.updateChatflow(chatflow, updateChatFlow, orgId, workspaceId, subscriptionId)
return res.json(apiResponse)
} catch (error) {
next(error)
}
}
const getSinglePublicChatflow = async (req: Request, res: Response, next: NextFunction) => {
let queryRunner: QueryRunner | undefined
try {
if (typeof req.params === 'undefined' || !req.params.id) {
throw new InternalFlowiseError(
StatusCodes.PRECONDITION_FAILED,
`Error: chatflowsController.getSinglePublicChatflow - id not provided!`
)
}
const chatflow = await chatflowsService.getChatflowById(req.params.id)
if (!chatflow) return res.status(StatusCodes.NOT_FOUND).json({ message: 'Chatflow not found' })
if (chatflow.isPublic)
return res.status(StatusCodes.OK).json({ ...chatflow, flowData: sanitizeFlowDataForPublicEndpoint(chatflow.flowData) })
if (!req.user) return res.status(StatusCodes.UNAUTHORIZED).json({ message: GeneralErrorMessage.UNAUTHORIZED })
queryRunner = getRunningExpressApp().AppDataSource.createQueryRunner()
const workspaceUserService = new WorkspaceUserService()
const workspaceUser = await workspaceUserService.readWorkspaceUserByUserId(req.user.id, queryRunner)
if (workspaceUser.length === 0)
return res.status(StatusCodes.NOT_FOUND).json({ message: WorkspaceUserErrorMessage.WORKSPACE_USER_NOT_FOUND })
const workspaceIds = workspaceUser.map((user) => user.workspaceId)
if (!workspaceIds.includes(chatflow.workspaceId))
return res.status(StatusCodes.BAD_REQUEST).json({ message: 'You are not in the workspace that owns this chatflow' })
return res.status(StatusCodes.OK).json(chatflow)View on GitHub (pinned to abe4a8601a)
Solutions
- Ensure the request URL has a non-empty id.
- Validate the id is set client-side before calling.
- Confirm the embed/integration passes the correct chatflow id.
Example fix
// before
await api.get(`/api/v1/public-chatflows/`)
// after
if (!chatflowId) throw new Error('chatflowId required')
await api.get(`/api/v1/public-chatflows/${chatflowId}`) Defensive patterns
Strategy: validation
Validate before calling
if (!id || typeof id !== 'string' || id.length === 0) {
throw new Error('chatflow id required for public fetch')
} Type guard
function isNonEmptyId(v: unknown): v is string {
return typeof v === 'string' && v.trim().length > 0
} Prevention
- Inject the chatflow id into embed snippets via templating with a fallback check.
- Test embed snippets with a known-good id before shipping.
- Keep a typed client wrapper for public endpoints.
When it happens
Trigger: Calling the public-chatflow endpoint without an id segment; client built the URL from an undefined variable.
Common situations: Embed snippet loaded before the chatflow id was injected; SDK path change; URL template typo.
Related errors
- Error: chatflowsController.getSinglePublicChatbotConfig - id
- Error: chatMessagesController.abortChatMessage - chatflowid
- Error: chatflowsController.checkIfChatflowIsValidForStreamin
- Error: chatflowsController.checkIfChatflowIsValidForUploads
- Error: chatflowsController.deleteChatflow - id not provided!
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/206e1855cdba5444.
Report an issue: GitHub.