{"record":{"id":"c0f526fc62bf4fb9","repo":"langfuse/langfuse","slug":"evaluator-filters-are-invalid-remove-unsupported","errorCode":null,"errorMessage":"Evaluator filters are invalid. Remove unsupported or incomplete filters and try again.","messagePattern":"Evaluator filters are invalid\\. Remove unsupported or incomplete filters and try again\\.","errorType":"exception","errorClass":"InvalidRequestError","httpStatus":400,"severity":"error","filePath":"web/src/features/evals/server/router.ts","lineNumber":598,"sourceCode":"        projectId: input.projectId,\n        scope: \"evalJob:CUD\",\n      });\n\n      assertCanCreateLegacyEvalJob({\n        projectId: input.projectId,\n        target: input.target,\n      });\n\n      const variableMappingForTarget = validateVariableMappingForTarget({\n        targetObject: input.target,\n        mapping: input.mapping,\n      });\n      const filterValidation = validateEvaluatorFiltersForTarget({\n        targetObject: input.target,\n        filter: input.filter ?? [],\n      });\n      if (!filterValidation.isValid) {\n        throw new InvalidRequestError(\n          filterValidation.issues[0]?.message ??\n            \"Evaluator filters are invalid. Remove unsupported or incomplete filters and try again.\",\n        );\n      }\n      const validatedFilter = filterValidation.validatedFilters;\n\n      const compatibility = new LegacyEvalCompatibilityService(ctx.prisma);\n      const template = await compatibility.getTemplate(\n        input.projectId,\n        input.evalTemplateId,\n      );\n      if (!template) {\n        throw new LangfuseNotFoundError(\"Evaluator template not found\");\n      }\n      if (template.type === EvalTemplateType.CODE) {\n        assertCodeEvalTemplateCanRun({\n          sourceCodeLanguage: template.sourceCodeLanguage,\n        });","sourceCodeStart":580,"sourceCodeEnd":616,"githubUrl":"https://github.com/langfuse/langfuse/blob/59d92c7cf365150d10b753b5a0d1708902a2ed60/web/src/features/evals/server/router.ts#L580-L616","documentation":"Thrown as an InvalidRequestError by the evalRouter createJob mutation when validateEvaluatorFiltersForTarget reports the supplied filter array is invalid for the evaluator's target object. The thrown message is the first validation issue's message if present, otherwise this generic fallback text (e.g. when issues exist but carry no message).","triggerScenarios":"Calling evalRouter.createJob with input.filter containing filter entries unsupported for input.target, or incomplete filter objects that fail validation but produce issues without messages.","commonSituations":"Filters copied from a trace-level UI into an observation-level evaluator; filter entries missing required fields (column/operator/value); legacy clients sending old filter shapes after the evaluator migration narrowed supported filters to what InMemoryFilterService can process.","solutions":["Remove unsupported or incomplete filter entries — only send filters valid for the evaluator's target object","Rebuild the filter in the current UI's search-bar grammar and copy the resulting filter state","Validate input.filter with validateEvaluatorFiltersForTarget client-side before submitting createJob","If the first issue message is unhelpful (generic fallback text), inspect all filterValidation.issues via a dry-run or API echo to find the offending entry"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import { validateEvaluatorFiltersForTarget } from '...';\n\nconst { isValid } = validateEvaluatorFiltersForTarget({\n  targetObject: input.target,\n  filter: input.filter ?? [],\n});\nif (!isValid) {\n  // strip/fix invalid filters before createJob\n}","typeGuard":"function hasValidFilters(target: string, filter: unknown[]): boolean {\n  return validateEvaluatorFiltersForTarget({ targetObject: target, filter }).isValid;\n}","tryCatchPattern":null,"preventionTips":["Validate filters with validateEvaluatorFiltersForTarget before submitting","Build filters with the current search-bar grammar rather than hand-writing JSON","Ensure every filter entry has column, operator, and value/type fields complete"],"tags":["langfuse","evals","filters","validation","bad-request"],"backgroundTag":"schema-validation-failed","analyzedSha":"59d92c7cf365150d10b753b5a0d1708902a2ed60","analyzedAt":"2026-08-27T22:22:00.402Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}