FlowiseAI/Flowise · error · InternalFlowiseError

Error: chatflowsController.getSinglePublicChatbotConfig -…

Error message

Error: chatflowsController.getSinglePublicChatbotConfig - id not provided!

What it means

Thrown by getSinglePublicChatbotConfig when req.params.id is missing. PRECONDITION_FAILED (412) — first guard before the service call that returns the public chatbot configuration. This endpoint is typically hit by the embedded chatbot widget to load its config.

Solutions

  1. Ensure the embed URL / API call includes a non-empty chatflow id.
  2. Verify the CMS/template actually injects the id value.
  3. Test the embed snippet with a known-good id.

Example fix

// before
await api.get(`/api/v1/public-chatbot-config/`)
// after
if (!chatflowId) throw new Error('chatflowId required')
await api.get(`/api/v1/public-chatbot-config/${chatflowId}`)
Defensive patterns

Strategy: validation

Validate before calling

if (!chatflowId || typeof chatflowId !== 'string' || chatflowId.length === 0) {
  throw new Error('chatflow id required to load chatbot config')
}

Type guard

function isNonEmptyId(v: unknown): v is string {
  return typeof v === 'string' && v.trim().length > 0
}

Prevention

When it happens

Trigger: Widget/config endpoint called without an id segment; embed script given an empty chatflow id.

Common situations: Embed snippet installed with a blank chatflow id field; CMS templating left the id empty; SDK version change to the config path.

Related errors


AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12). Data as JSON: /api/errors/03cd12bcfd082baa. Report an issue: GitHub.

Appendix: source

Thrown at packages/server/src/controllers/chatflows/index.ts:262

        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)
    } catch (error) {
        next(error)
    } finally {
        if (queryRunner) await queryRunner.release()
    }
}

const getSinglePublicChatbotConfig = async (req: Request, res: Response, next: NextFunction) => {
    try {
        if (typeof req.params === 'undefined' || !req.params.id) {
            throw new InternalFlowiseError(
                StatusCodes.PRECONDITION_FAILED,
                `Error: chatflowsController.getSinglePublicChatbotConfig - id not provided!`
            )
        }
        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!`
            )

View on GitHub (pinned to abe4a8601a)