{"record":{"id":"13ee2ba1e289b0eb","repo":"cube-js/cube","slug":"operator-f-operator-not-supported-for-filter","errorCode":null,"errorMessage":"Operator ${f.operator} not supported for filter: ${JSON.stringify(f)}","messagePattern":"Operator (.+?) not supported for filter: (.+?)","errorType":"validation","errorClass":"UserError","httpStatus":null,"severity":"error","filePath":"packages/cubejs-api-gateway/src/query.js","lineNumber":373,"sourceCode":"\nconst normalizeQueryFilters = (filter, timezone) => (\n  filter.map(f => {\n    const res = { ...f };\n    if (f.or) {\n      res.or = normalizeQueryFilters(f.or, timezone);\n      return res;\n    }\n    if (f.and) {\n      res.and = normalizeQueryFilters(f.and, timezone);\n      return res;\n    }\n\n    if (!f.operator) {\n      throw new UserError(`Operator required for filter: ${JSON.stringify(f)}`);\n    }\n\n    if (operators.indexOf(f.operator) === -1) {\n      throw new UserError(`Operator ${f.operator} not supported for filter: ${JSON.stringify(f)}`);\n    }\n\n    if ((!f.values || f.values.length === 0) && ['set', 'notSet', 'measureFilter'].indexOf(f.operator) === -1) {\n      throw new UserError(`Values required for filter: ${JSON.stringify(f)}`);\n    }\n\n    if (f.values) {\n      res.values = f.values.map(v => (v != null ? v.toString() : v));\n    }\n\n    if (f.dimension) {\n      res.member = f.dimension;\n      delete res.dimension;\n    }\n\n    return normalizeDateFilterValues(res, timezone);\n  })\n);","sourceCodeStart":355,"sourceCodeEnd":391,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/packages/cubejs-api-gateway/src/query.js#L355-L391","documentation":"Whitelist guard in normalizeQueryFilters: the filter's `operator` value is present but not in the supported `operators` list. It fires when clients send misspelled or unsupported operator names for a filter.","triggerScenarios":"Thrown at packages/cubejs-api-gateway/src/query.js:373 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Replace the operator with one from the supported set (equals, notEquals, contains, notContains, set, notSet, inDateRange, beforeOrOnDate, afterOrOnDate, measureFilter, etc.).","Check for typos or casing differences in the operator string.","Consult the Cube REST API filter documentation for the exact operator names."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}