FlowiseAI/Flowise · error · InternalFlowiseError

Error: componentsCredentialsController.getComponentByName -

Error message

Error: componentsCredentialsController.getComponentByName - name not provided!

What it means

Thrown by componentsCredentialsController.getComponentByName when req.params.name is missing. The endpoint returns a single component-credential definition identified by name, so the name is mandatory. Returned as PRECONDITION_FAILED (412).

Source

Thrown at packages/server/src/controllers/components-credentials/index.ts:20

import componentsCredentialsService from '../../services/components-credentials'
import { InternalFlowiseError } from '../../errors/internalFlowiseError'
import { StatusCodes } from 'http-status-codes'

// Get all component credentials
const getAllComponentsCredentials = async (req: Request, res: Response, next: NextFunction) => {
    try {
        const apiResponse = await componentsCredentialsService.getAllComponentsCredentials()
        return res.json(apiResponse)
    } catch (error) {
        next(error)
    }
}

// Get component credential via name
const getComponentByName = async (req: Request, res: Response, next: NextFunction) => {
    try {
        if (typeof req.params === 'undefined' || !req.params.name) {
            throw new InternalFlowiseError(
                StatusCodes.PRECONDITION_FAILED,
                `Error: componentsCredentialsController.getComponentByName - name not provided!`
            )
        }
        const apiResponse = await componentsCredentialsService.getComponentByName(req.params.name)
        return res.json(apiResponse)
    } catch (error) {
        next(error)
    }
}

// Returns specific component credential icon via name
const getSingleComponentsCredentialIcon = async (req: Request, res: Response, next: NextFunction) => {
    try {
        if (typeof req.params === 'undefined' || !req.params.name) {
            throw new InternalFlowiseError(
                StatusCodes.PRECONDITION_FAILED,
                `Error: componentsCredentialsController.getSingleComponentsCredentialIcon - name not provided!`

View on GitHub (pinned to abe4a8601a)

Solutions

  1. Include the component name in the path.
  2. Guard the fetch on a selected component name on the client.
  3. Confirm the route declares :name.

Example fix

// before
fetch(`/api/v1/components-credentials/`)
// after
fetch(`/api/v1/components-credentials/${encodeURIComponent(name)}`)
Defensive patterns

Strategy: validation

Validate before calling

function getComponentByName(name: string) {
  if (!name) throw new Error('component name required')
  return fetch(`/api/v1/components-credentials/${encodeURIComponent(name)}`)
}

Type guard

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

Try / catch

try { await getComponentByName(name) } catch (e) { if (e.statusCode === 412) throw new Error('provide a component name') }

Prevention

When it happens

Trigger: GET to the component-by-name route with no :name segment, or a route declaration missing :name so the param resolves undefined.

Common situations: Catalog UI requesting a component before selection, URL built from an undefined name, or a renamed component whose old link no longer carries a name.

Related errors


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