n8n-io/n8n · error · ValidationError
VALIDATION_ERROR
VALIDATION_ERROR
Error message
Invalid rename node parameters
What it means
Zod schema validation failed on the input to rename_node. The schema (renameNodeSchema) requires nodeId as a string and newName as a non-empty string (min(1)). The catch block relabels the ZodError as VALIDATION_ERROR with the issue list in details.
Source
Thrown at packages/@n8n/ai-workflow-builder.ee/src/tools/rename-node.tool.ts:135
oldName,
newName,
message,
};
const stateUpdates = renameNodeInWorkflow(validatedInput.nodeId, oldName, newName);
reporter.complete(output);
return createSuccessResponse(config, message, stateUpdates);
} catch (error) {
let toolError;
if (error instanceof z.ZodError) {
const validationError = new ValidationError('Invalid rename node parameters', {
field: error.errors[0]?.path.join('.'),
value: error.errors[0]?.message,
});
toolError = {
message: validationError.message,
code: 'VALIDATION_ERROR',
details: error.errors,
};
} else {
toolError = {
message: error instanceof Error ? error.message : 'Unknown error occurred',
code: 'EXECUTION_ERROR',
};
}
reporter.error(toolError);
return createErrorResponse(config, toolError);
}
},
{
name: RENAME_NODE_TOOL.toolName,
description: `Rename a node in the workflow. This updates the node's display name and automatically updates all connection references.
USAGE:View on GitHub (pinned to 5ac6606e81)
Solutions
- Read details (ZodError.issues) for the first failing path.
- Pass a valid nodeId UUID and a non-empty newName string.
- Re-invoke rename_node with corrected input.
Example fix
// before
rename_node.invoke({ nodeId: 'abc', newName: '' });
// after
rename_node.invoke({ nodeId: 'abc-1234', newName: 'Process Orders' }); Defensive patterns
Strategy: validation
Validate before calling
import { renameNodeSchema } from '@/tools/rename-node.tool';
const parsed = renameNodeSchema.safeParse(input);
if (!parsed.success) { /* surface parsed.error.issues, skip the tool call */ } Type guard
function isValidRenameInput(v: unknown): v is { nodeId: string; newName: string } {
return typeof v === 'object' && v !== null
&& typeof (v as any).nodeId === 'string'
&& typeof (v as any).newName === 'string'
&& (v as any).newName.length > 0;
} Try / catch
try {
renameNodeSchema.parse(input);
} catch (e) {
if (e instanceof z.ZodError) { /* e.issues has field-level detail */ }
} Prevention
- Run the exported schema with safeParse before invoking rename_node.
- Reject empty newName upstream of the tool.
- Type agent tool-call arguments from the schema's inferred type.
When it happens
Trigger: Missing nodeId; empty newName; non-string values for either field.
Common situations: The LLM passes an empty string for newName; nodeId omitted; an object passed instead of a UUID.
Related errors
- VALIDATION_ERROR
- VALIDATION_ERROR
- Tool "${this.name}" requires an input schema
- INVALID_CONNECTION
- SELF_CONNECTION
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/87ae5b67ab5bae08.
Report an issue: GitHub.