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

  1. Match argument types to the method contract (filter: string,string,any; limit: number; range: number,number).
  2. Verify referenced columns exist on the target table/RPC.
  3. Inspect the appended inner message to find which method and why.
  4. 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

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


AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12). Data as JSON: /api/errors/3078d8d4d1109788. Report an issue: GitHub.