FlowiseAI/Flowise · error · InternalFlowiseError
Error: componentsCredentialsController.getSingleComponentsCr
Error message
Error: componentsCredentialsController.getSingleComponentsCredentialIcon - name not provided!
What it means
Thrown by getSingleComponentsCredentialIcon when req.params.name is missing. The endpoint resolves and streams the icon file for a named component credential via res.sendFile. Without a name the service cannot locate the asset. Returned as PRECONDITION_FAILED (412).
Source
Thrown at packages/server/src/controllers/components-credentials/index.ts:36
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!`
)
}
const apiResponse = await componentsCredentialsService.getSingleComponentsCredentialIcon(req.params.name)
return res.sendFile(apiResponse)
} catch (error) {
next(error)
}
}
export default {
getAllComponentsCredentials,
getComponentByName,
getSingleComponentsCredentialIcon
}
View on GitHub (pinned to abe4a8601a)
Solutions
- Provide the component-credential name in the path.
- Render the icon element only when a name is known.
- Confirm the route declares :name and that the static-asset resolution path exists.
Example fix
// before
<img src={`/api/v1/components-credentials/icon`} />
// after
<img src={`/api/v1/components-credentials/${encodeURIComponent(name)}/icon`} /> Defensive patterns
Strategy: validation
Validate before calling
function getComponentIcon(name: string) {
if (!name) throw new Error('component name required for icon')
return fetch(`/api/v1/components-credentials/${encodeURIComponent(name)}/icon`)
} Type guard
const isNonEmptyString = (v: unknown): v is string => typeof v === 'string' && v.trim().length > 0
Try / catch
try { await getComponentIcon(name) } catch (e) { if (e.statusCode === 412) throw new Error('provide a component name') } Prevention
- Render icon elements only when a name is known.
- Validate name presence client-side.
- Confirm the route declares :name.
When it happens
Trigger: GET to the icon route without :name, or a route without :name declared so the param is undefined.
Common situations: Icon <img src> built from an unselected component, a migration that changed component names leaving stale icon URLs, or a typo'd path template.
Related errors
- Error: componentsCredentialsController.getComponentByName -
- Error: chatflowsController.checkIfChatflowHasChanged - lastU
- Error: chatflowsController.setWebhookSecret - id not provide
- Error: chatflowsController.clearWebhookSecret - id not provi
- Error: chatflowsController.getScheduleStatus - id not provid
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/0f66711017a53268.
Report an issue: GitHub.