{"record":{"id":"5f697b10030f0658","repo":"medusajs/medusa","slug":"rule-operator-rule-operator-is-not-supported-m","errorCode":null,"errorMessage":"Rule operator ${rule.operator} is not supported. Must be one of ${availableOperators.join(\", \")}","messagePattern":"Rule operator (.+?) is not supported\\. Must be one of (.+?)","errorType":"validation","errorClass":"MedusaError","httpStatus":400,"severity":"error","filePath":"packages/modules/fulfillment/src/utils/utils.ts","lineNumber":121,"sourceCode":"    )\n  }\n\n  if (!isString(rule.attribute)) {\n    throw new MedusaError(\n      MedusaError.Types.INVALID_DATA,\n      \"Rule attribute must be a string\"\n    )\n  }\n\n  if (!isString(rule.operator)) {\n    throw new MedusaError(\n      MedusaError.Types.INVALID_DATA,\n      \"Rule operator must be a string\"\n    )\n  }\n\n  if (!availableOperators.includes(rule.operator as RuleOperator)) {\n    throw new MedusaError(\n      MedusaError.Types.INVALID_DATA,\n      `Rule operator ${\n        rule.operator\n      } is not supported. Must be one of ${availableOperators.join(\", \")}`\n    )\n  }\n\n  if (rule.operator === RuleOperator.IN || rule.operator === RuleOperator.NIN) {\n    if (!Array.isArray(rule.value)) {\n      throw new MedusaError(\n        MedusaError.Types.INVALID_DATA,\n        \"Rule value must be an array for in/nin operators\"\n      )\n    }\n  } else {\n    if (Array.isArray(rule.value) || isObject(rule.value)) {\n      throw new MedusaError(\n        MedusaError.Types.INVALID_DATA,","sourceCodeStart":103,"sourceCodeEnd":139,"githubUrl":"https://github.com/medusajs/medusa/blob/5e06e544a296b9033f20f71f11c559f81a0e5739/packages/modules/fulfillment/src/utils/utils.ts#L103-L139","documentation":"The rule operator must be one of the supported operators exposed by the fulfillment module (the availableOperators list — eq, neq, gt, gte, lt, lte, in, nin). Any other string throws INVALID_DATA listing the valid options.","triggerScenarios":"Using operators like '=', '!=' , 'contains', or '>' instead of the canonical tokens; version drift where operators were renamed/added.","commonSituations":"Porting rule definitions from another system or an older Medusa version; hand-writing operators from memory.","solutions":["Use only the operators listed in the error message","Map legacy symbols: = -> eq, != -> neq, > -> gt, etc.","If you need 'in'/'nin', supply an array value"],"exampleFix":"// before\nrules: [{ attribute: 'cart_total', operator: '>', value: 100 }]\n// after\nrules: [{ attribute: 'cart_total', operator: 'gt', value: 100 }]","handlingStrategy":"validation","validationCode":"const OPERATORS = ['eq','neq','gt','gte','lt','lte','in','nin']\nif (!OPERATORS.includes(rule.operator)) throw new Error(`Unsupported operator: ${rule.operator}`)","typeGuard":"type RuleOperatorT = 'eq'|'neq'|'gt'|'gte'|'lt'|'lte'|'in'|'nin'\nconst isSupportedOperator = (o: string): o is RuleOperatorT => OPERATORS.includes(o)","tryCatchPattern":null,"preventionTips":["Map legacy symbols (=, !=, >, <) to canonical tokens in an adapter layer","Pin and read the operator list from the module version you use"],"tags":["fulfillment","rules","operator","validation"],"backgroundTag":"enum-validation-failed","analyzedSha":"5e06e544a296b9033f20f71f11c559f81a0e5739","analyzedAt":"2026-08-27T07:24:39.599Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}