FlowiseAI/Flowise · error · Error
Failed to call ${method}: ${error.message}
Error message
Failed to call ${method}: ${error.message} What it means
Inside the built filter function, each `result[method](...args)` call is wrapped in its own try/catch; if the method throws (wrong arg types, value coercion, PostgREST-level error), it re-throws as 'Failed to call ${method}: ${error.message}'. This converts builder-call-time failures into a uniform message, again losing the original error object.
Source
Thrown at packages/components/nodes/vectorstores/Supabase/filterParser.ts:196
throw new Error(`Potentially dangerous argument: ${arg}`)
}
return arg
}
private static buildFilterFunction(chain: Array<{ method: string; args: any[] }>): (rpc: any) => any {
return (rpc: any) => {
let result = rpc
for (const { method, args } of chain) {
if (typeof result[method] !== 'function') {
throw new Error(`Method ${method} is not available on the RPC object`)
}
try {
result = result[method](...args)
} catch (error) {
throw new Error(`Failed to call ${method}: ${error.message}`)
}
}
return result
}
}
}
View on GitHub (pinned to abe4a8601a)
Solutions
- Match argument types to the method contract (filter: string,string,any; limit: number; range: number,number).
- Verify referenced columns exist on the target table/RPC.
- Inspect the appended inner message to find which method and why.
- Coerce/validate args before building the filter string.
Example fix
// before: 'limit("ten")' -> Failed to call limit: ...
// after: 'limit(10)' Defensive patterns
Strategy: try-catch
Validate before calling
function coerceArgs(method: string, args: any[]): any[] {
if (method === 'limit') return [Number(args[0])]
if (method === 'range') return [Number(args[0]), Number(args[1])]
return args
} Type guard
null
Try / catch
try { result = result[method](...coerceArgs(method, args)) } catch (e) { throw new Error(`Call '${method}' failed: ${(e as Error).message}`, { cause: e }) } Prevention
- Match argument types to each method's contract.
- Verify referenced columns exist on the table/RPC.
- Read the appended inner message to localize the failing method.
- Coerce numbers for limit/range before building the filter.
When it happens
Trigger: Calling `filter` with wrong arg types (non-string column, invalid operator at runtime), `limit` with non-number, `range` with bad indices, or any builder method rejecting the supplied args at runtime.
Common situations: Argument types correct at parse time but wrong at call time (e.g. number vs string); column referenced does not exist on the table; operator semantics rejected by PostgREST.
Related errors
- Failed to parse Supabase filter: ${error.message}
- No valid filter methods found
- Method ${method} is not available on the RPC object
- Disallowed method: ${method}
- Disallowed filter operator: ${operator}
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/3078d8d4d1109788.
Report an issue: GitHub.