FlowiseAI/Flowise · error · Error
Invalid table name: must be at most ${RECORD_MANAGER_TABLE_N
Error message
Invalid table name: must be at most ${RECORD_MANAGER_TABLE_NAME_MAX_LENGTH} characters What it means
After the character-class check passes, sanitizeRecordManagerTableName rejects names longer than RECORD_MANAGER_TABLE_NAME_MAX_LENGTH (128). This guards against over-long SQL identifiers, which some databases reject or truncate. The constant is exported so callers can pre-truncate.
Source
Thrown at packages/components/src/recordManagerSecurity.ts:15
export const RECORD_MANAGER_TABLE_NAME_MAX_LENGTH = 128
export const RECORD_MANAGER_NAMESPACE_MAX_LENGTH = 128
/**
* Validates record manager table names used in SQL identifiers.
*/
export function sanitizeRecordManagerTableName(tableName: string): string {
tableName = tableName.trim().toLowerCase().replace(/\s+/g, '_')
if (!/^[a-zA-Z0-9_]+$/.test(tableName)) {
throw new Error('Invalid table name')
}
if (tableName.length > RECORD_MANAGER_TABLE_NAME_MAX_LENGTH) {
throw new Error(`Invalid table name: must be at most ${RECORD_MANAGER_TABLE_NAME_MAX_LENGTH} characters`)
}
return tableName
}
/**
* Validates record manager namespace values stored in the database.
*/
export function sanitizeRecordManagerNamespace(namespace: string): string {
const trimmed = namespace.trim()
if (!/^[a-zA-Z0-9_-]{1,128}$/.test(trimmed)) {
throw new Error('Invalid namespace')
}
if (trimmed.length > RECORD_MANAGER_NAMESPACE_MAX_LENGTH) {
throw new Error(`Invalid namespace: must be at most ${RECORD_MANAGER_NAMESPACE_MAX_LENGTH} characters`)
}View on GitHub (pinned to abe4a8601a)
Solutions
- Truncate or hash the name to <= RECORD_MANAGER_TABLE_NAME_MAX_LENGTH (128) before calling.
- Compute a stable short hash (e.g. sha256 prefix) when the source name is unbounded.
Example fix
// before sanitizeRecordManagerTableName(longName) // throws if > 128 chars // after const name = longName.length > RECORD_MANAGER_TABLE_NAME_MAX_LENGTH ? longName.slice(0, RECORD_MANAGER_TABLE_NAME_MAX_LENGTH) : longName sanitizeRecordManagerTableName(name)
Defensive patterns
Strategy: validation
Validate before calling
import { RECORD_MANAGER_TABLE_NAME_MAX_LENGTH } from './recordManagerSecurity'
function truncateTableName(raw: string): string {
let n = raw.trim().toLowerCase().replace(/\s+/g, '_').replace(/[^a-z0-9_]/g, '_')
if (n.length > RECORD_MANAGER_TABLE_NAME_MAX_LENGTH) {
n = n.slice(0, RECORD_MANAGER_TABLE_NAME_MAX_LENGTH)
}
return n
} Type guard
const isWithinTableLength = (s: string): boolean => s.trim().toLowerCase().replace(/\s+/g, '_').length <= RECORD_MANAGER_TABLE_NAME_MAX_LENGTH
Prevention
- Cap generated/composite names at RECORD_MANAGER_TABLE_NAME_MAX_LENGTH (128).
- Hash unbounded source names (e.g. sha256 prefix) instead of concatenating identifiers.
When it happens
Trigger: Passing a generated/composite name longer than 128 chars after normalization, e.g. a long hash or a concatenation of tenant + workflow + node identifiers.
Common situations: Multi-tenant systems building table names from UUIDs or long paths; automated naming schemes that don't cap length.
Related errors
- Invalid table name
- Invalid table name
- Invalid table name
- Invalid JSON in the Additional Configuration: ${exception}
- Invalid table name
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/2b7c1084f3808fbf.
Report an issue: GitHub.