refinedev/refine · error · Error
Operator ${operator} is not supported for the Medusa data pr
Error message
Operator ${operator} is not supported for the Medusa data provider What it means
The Medusa data provider can only translate the "eq" CrudOperators filter into a Medusa store query; any other operator (contains, in, gte, lt, or, etc.) throws. Medusa's storefront query API only supports equality-style filtering, so the provider rejects unsupported filter operators early.
Source
Thrown at packages/medusa/src/utils/mapOperator.ts:8
import type { CrudOperators } from "@refinedev/core";
export const mapOperator = (operator: CrudOperators): string => {
switch (operator) {
case "eq":
return "";
default:
throw Error(
`Operator ${operator} is not supported for the Medusa data provider`,
);
}
};
View on GitHub (pinned to 779d52a20e)
Solutions
- Change the filter operator to "eq" (or remove the filter) so mapOperator can handle it
- Restructure the UI so only equality filters are exposed against Medusa resources
- Pre-filter client-side or call Medusa's search endpoint directly for text search
Example fix
// before
const { tableProps } = useTable({ filters: { initial: [{ field: "title", operator: "contains", value: "shirt" }] } });
// after
const { tableProps } = useTable({ filters: { initial: [{ field: "title", operator: "eq", value: "shirt" }] } }); Defensive patterns
Strategy: validation
Validate before calling
const MEDUSA_OK = new Set(["eq"]); const safeFilters = filters.filter((f) => MEDUSA_OK.has(f.operator));
Type guard
const isMedusaSupportedFilter = (f: { operator: string }): boolean => f.operator === "eq"; Try / catch
try { await dataProvider.getList({ resource, filters, pagination: { current: 1, pageSize: 10 } }); } catch (e) { if (String(e).includes("not supported for the Medusa")) { /* drop non-eq filters and retry */ } else throw e; } Prevention
- Only expose equality filters in UI bound to Medusa resources
- Centralize filter construction per provider so unsupported operators never reach Medusa
When it happens
Trigger: Using a Refine hook with filters, e.g. useTable({ filters: { permanentSetters... } }) or onSearch, where a filter uses an operator other than "eq", such as { field: "title", operator: "contains", value: "x" }.
Common situations: Copying list/table filters from a Strapi or Supabase example app; enabling search inputs that default to "contains"; combining filters with "or".
Related errors
- Operator ${operator} is not supported
- Operator 'and' is not supported
- Max deep reached
- @packages/hasura: multiple filters present. Group multiple p
- Not implemented on refine-airtable data provider.
AI-assisted analysis of refinedev/refine@779d52a20e (2026-08-27).
Data as JSON: /api/errors/b9b83d26d765c460.
Report an issue: GitHub.