FlowiseAI/Flowise · error · InternalFlowiseError
Error: credentialsController.deleteCredentials - id not prov
Error message
Error: credentialsController.deleteCredentials - id not provided!
What it means
Thrown by credentialsController.deleteCredentials when req.params.id is falsy. The endpoint deletes a stored credential scoped to the caller's workspace, so the credential id is mandatory. Returned as PRECONDITION_FAILED (412). Note the same handler later throws a workspace-not-found error whose message interpolates the undefined workspaceId (a minor logging quirk).
Source
Thrown at packages/server/src/controllers/credentials/index.ts:26
if (!req.body) {
throw new InternalFlowiseError(
StatusCodes.PRECONDITION_FAILED,
`Error: credentialsController.createCredential - body not provided!`
)
}
const body = req.body
body.workspaceId = req.user?.activeWorkspaceId
const apiResponse = await credentialsService.createCredential(body)
return res.json(apiResponse)
} catch (error) {
next(error)
}
}
const deleteCredentials = async (req: Request, res: Response, next: NextFunction) => {
try {
if (typeof req.params === 'undefined' || !req.params.id) {
throw new InternalFlowiseError(
StatusCodes.PRECONDITION_FAILED,
`Error: credentialsController.deleteCredentials - id not provided!`
)
}
const workspaceId = req.user?.activeWorkspaceId
if (!workspaceId) {
throw new InternalFlowiseError(
StatusCodes.NOT_FOUND,
`Error: credentialsController.deleteCredentials - workspace ${workspaceId} not found!`
)
}
const apiResponse = await credentialsService.deleteCredentials(req.params.id, workspaceId)
return res.json(apiResponse)
} catch (error) {
next(error)
}
}
View on GitHub (pinned to abe4a8601a)
Solutions
- Include the credential id in the DELETE path.
- Guard the delete action on a selected credential id on the client.
- Confirm the route declares :id.
Example fix
// before
fetch(`/api/v1/credentials/`, { method: 'DELETE' })
// after
fetch(`/api/v1/credentials/${encodeURIComponent(credentialId)}`, { method: 'DELETE' }) Defensive patterns
Strategy: validation
Validate before calling
function deleteCredential(id: string) {
if (!id) throw new Error('credential id required')
return fetch(`/api/v1/credentials/${encodeURIComponent(id)}`, { method: 'DELETE' })
} Type guard
const isNonEmptyString = (v: unknown): v is string => typeof v === 'string' && v.trim().length > 0
Try / catch
try { await deleteCredential(id) } catch (e) { if (e.statusCode === 412) throw new Error('provide a credential id') } Prevention
- Bind the delete action to a selected credential.
- Validate id presence client-side.
- Confirm the route declares :id.
When it happens
Trigger: A DELETE request whose path omits the :id segment, or a route registration without :id so req.params.id is undefined.
Common situations: Delete button fired before an id is bound, URL built from a null id, or router mounted the handler on a bare path.
Related errors
- Error: chatflowsController.checkIfChatflowHasChanged - lastU
- Error: chatflowsController.setWebhookSecret - id not provide
- Error: chatflowsController.clearWebhookSecret - id not provi
- Error: chatflowsController.getScheduleStatus - id not provid
- Error: chatflowsController.getScheduleTriggerLogs - id not p
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/49fb5affcd66fb22.
Report an issue: GitHub.