FlowiseAI/Flowise · error · InternalFlowiseError

Error: chatflowsController.checkIfChatflowIsValidForUploads

Error message

Error: chatflowsController.checkIfChatflowIsValidForUploads - id not provided!

What it means

Thrown by checkIfChatflowIsValidForUploads when req.params.id is missing — a 412 PRECONDITION_FAILED guard identical in shape to the streaming check. Fires before the service call, so it is purely a missing-route-param rejection.

Source

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

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!`
            )
        }
        const apiResponse = await chatflowsService.checkIfChatflowIsValidForUploads(req.params.id)
        return res.json(apiResponse)
    } catch (error) {
        next(error)
    }
}

const deleteChatflow = async (req: Request, res: Response, next: NextFunction) => {
    try {
        if (typeof req.params === 'undefined' || !req.params.id) {
            throw new InternalFlowiseError(StatusCodes.PRECONDITION_FAILED, `Error: chatflowsController.deleteChatflow - id not provided!`)
        }
        const orgId = req.user?.activeOrganizationId
        if (!orgId) {

View on GitHub (pinned to abe4a8601a)

Solutions

  1. Ensure the request URL includes a non-empty id.
  2. Validate the client-side id variable is set before calling.
  3. Match client path against the server route definition.

Example fix

// before
await api.get(`/api/v1/chatflows/${id}/valid-for-uploads`)
// after
if (!id) throw new Error('chatflow id required')
await api.get(`/api/v1/chatflows/${id}/valid-for-uploads`)
Defensive patterns

Strategy: validation

Validate before calling

if (!id || typeof id !== 'string' || id.length === 0) {
  throw new Error('chatflow id required before checking upload validity')
}

Type guard

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

Prevention

When it happens

Trigger: Calling the uploads-validity endpoint with an empty or undefined id path segment; mismatched param name between client URL and server route.

Common situations: Frontend variable for chatflow id is undefined at call time; SDK upgrade changed endpoint path; proxy rewrite dropped the segment.

Related errors


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