{"record":{"id":"8afbaa07a5a36692","repo":"FlowiseAI/Flowise","slug":"no-valid-filter-methods-found","errorCode":null,"errorMessage":"No valid filter methods found","messagePattern":"No valid filter methods found","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/nodes/vectorstores/Supabase/filterParser.ts","lineNumber":96,"sourceCode":"                throw new Error(`Disallowed method: ${method}`)\n            }\n\n            // Parse arguments safely\n            const args = this.parseArguments(argsString)\n\n            // Additional validation for filter method\n            if (method === 'filter' && args.length >= 2) {\n                const operator = args[1]\n                if (typeof operator === 'string' && !this.ALLOWED_OPERATORS.includes(operator)) {\n                    throw new Error(`Disallowed filter operator: ${operator}`)\n                }\n            }\n\n            chain.push({ method, args })\n        }\n\n        if (chain.length === 0) {\n            throw new Error('No valid filter methods found')\n        }\n\n        return chain\n    }\n\n    private static parseArguments(argsString: string): any[] {\n        if (!argsString.trim()) {\n            return []\n        }\n\n        const args: any[] = []\n        let current = ''\n        let inString = false\n        let stringChar = ''\n        let depth = 0\n\n        for (let i = 0; i < argsString.length; i++) {\n            const char = argsString[i]","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/vectorstores/Supabase/filterParser.ts#L78-L114","documentation":"After tokenizing, if the parsed chain is empty the parser throws 'No valid filter methods found'. This means no method call matched the method pattern, so there is nothing safe to apply to the RPC. It guards against no-op filter strings being turned into a pass-through function.","triggerScenarios":"Empty or whitespace-only filter string; a string with only comments; a string that is just a literal/number with no `.method(...)` calls; malformed syntax the regex cannot tokenize (e.g. missing parentheses).","commonSituations":"Empty chatflow input submitted as a filter; user enters just a column name or raw SQL with no method chain; trailing content after a cleaned comment leaves no callable.","solutions":["Provide at least one allowed method call, e.g. `filter(\"col\",\"eq\",value)`.","If an empty filter is valid for your flow, short-circuit before calling parseFilterString (skip filtering).","Strip comments/semicolons and confirm the remaining string contains a method call.","Validate non-empty after cleaning before parsing."],"exampleFix":"// before: parseFilterString('')  -> No valid filter methods found\n// after: if (!raw.trim()) return (rpc) => rpc  // treat empty as no-op","handlingStrategy":"validation","validationCode":"function ensureNonEmptyFilter(raw: string): string {\n  const cleaned = raw.replace(/\\/\\/.*$/gm,'').replace(/\\/\\*[\\s\\S]*?\\*\\//g,'').replace(/\\s+/g,' ').trim().replace(/;$/,'').trim()\n  if (!cleaned || !/\\.?\\w+\\s*\\(/.test(cleaned)) throw new Error('Filter must contain at least one method call')\n  return cleaned\n}","typeGuard":"function hasMethodCall(s: string): boolean { return /\\.?\\w+\\s*\\([^)]*\\)/.test(s) }","tryCatchPattern":"null","preventionTips":["Short-circuit empty filter strings to a no-op before parsing.","Require at least one method call in the editor.","Strip comments/semicolons before checking emptiness.","Provide a filter template so users start from a valid example."],"tags":["supabase","filter-parser","input-validation","typescript"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}