FlowiseAI/Flowise · error · InternalFlowiseError

Error: chatflowsController.getScheduleTriggerLogs - id not p

Error message

Error: chatflowsController.getScheduleTriggerLogs - id not provided!

What it means

Thrown by getScheduleTriggerLogs when req.params?.id is falsy. The endpoint paginates trigger-execution logs for one chatflow, so the chatflow id is required. Returned as PRECONDITION_FAILED (412). Pagination params (page/limit/status) are read from req.query and are optional.

Source

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

        if (!workspaceId) {
            throw new InternalFlowiseError(StatusCodes.NOT_FOUND, 'Error: chatflowsController.getScheduleStatus - workspace not found!')
        }
        const status = await scheduleService.getScheduleStatus(req.params.id, workspaceId)
        return res.json({
            enabled: status.record?.enabled ?? false,
            canEnable: status.canEnable,
            reason: status.reason,
            record: status.record
        })
    } catch (error) {
        next(error)
    }
}

const getScheduleTriggerLogs = async (req: Request, res: Response, next: NextFunction) => {
    try {
        if (!req.params?.id) {
            throw new InternalFlowiseError(
                StatusCodes.PRECONDITION_FAILED,
                'Error: chatflowsController.getScheduleTriggerLogs - id not provided!'
            )
        }
        const workspaceId = req.user?.activeWorkspaceId
        if (!workspaceId) {
            throw new InternalFlowiseError(
                StatusCodes.NOT_FOUND,
                'Error: chatflowsController.getScheduleTriggerLogs - workspace not found!'
            )
        }
        const page = req.query.page ? parseInt(String(req.query.page), 10) : undefined
        const limit = req.query.limit ? parseInt(String(req.query.limit), 10) : undefined
        const statusRaw = req.query.status
        const status = Array.isArray(statusRaw) ? (statusRaw as any) : statusRaw ? (String(statusRaw) as any) : undefined
        const result = await scheduleService.getTriggerLogs(req.params.id, workspaceId, { page, limit, status })
        return res.json(result)
    } catch (error) {

View on GitHub (pinned to abe4a8601a)

Solutions

  1. Include the chatflow id in the path.
  2. Gate the logs request on a selected chatflow on the client.
  3. Confirm the route declares :id before the log-specific query params.

Example fix

// before
fetch(`/api/v1/chatflows//schedule/logs?page=1`)
// after
fetch(`/api/v1/chatflows/${encodeURIComponent(id)}/schedule/logs?page=1`)
Defensive patterns

Strategy: validation

Validate before calling

function fetchTriggerLogs(id: string, page?: number, limit?: number) {
  if (!id) throw new Error('chatflow id required to read trigger logs')
  const qs = new URLSearchParams()
  if (page) qs.set('page', String(page))
  if (limit) qs.set('limit', String(limit))
  return fetch(`/api/v1/chatflows/${encodeURIComponent(id)}/schedule/logs?${qs}`)
}

Type guard

const isNonEmptyString = (v: unknown): v is string => typeof v === 'string' && v.trim().length > 0

Try / catch

try { await fetchTriggerLogs(id, 1, 50) } catch (e) { if (e.statusCode === 412) throw new Error('provide a chatflow id') }

Prevention

When it happens

Trigger: GET to the trigger-logs route with no :id, or an empty id segment. The query params alone do not satisfy the requirement.

Common situations: Logs viewer opened with no chatflow context, broken deep link, or a client that builds the URL from an unguarded variable.

Related errors


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