refinedev/refine · error · Error

Operator is not supported for the Airtable data provider

Error message

Operator ${operator} is not supported for the Airtable data provider

What it means

Airtable formula generation supports only a subset of refine filter operators; `generateLogicalFilterFormula` throws when it encounters an operator it cannot translate (it handles eq/neq/in/nin/contains/ncontains/null/nnull etc., but not e.g. lt/gt/between/startswith on all paths). The thrown Error names the unsupported operator.

Solutions

  1. Restrict the filter dropdown to operators Airtable supports (eq, ne, in, nin, contains, ncontains, null, nnull)
  2. Precompute a computed field/formula column in Airtable and filter on it with a supported operator
  3. Handle unsupported operators client-side by post-filtering the returned records

Example fix

// before
filters: [{ field: 'price', operator: 'gt', value: 100 }]
// after — filter on a precomputed boolean field
filters: [{ field: 'isExpensive', operator: 'eq', value: true }]
Defensive patterns

Strategy: validation

Validate before calling

const supported = ['eq','ne','in','nin','contains','ncontains','null','nnull'];
if (!supported.includes(filter.operator)) {
  throw new Error(`Airtable does not support "+filter.operator+" — adjust the filter`);
}

Type guard

const isSupportedAirtableOperator = (op: string): op is 'eq'|'ne'|'in'|'nin'|'contains'|'ncontains'|'null'|'nnull' =>
  ['eq','ne','in','nin','contains','ncontains','null','nnull'].includes(op);

Try / catch

try {
  formula = generateLogicalFilterFormula(operator, field, value);
} catch (e) {
  if (/not supported/.test((e as Error).message)) useClientSideFilter();
  else throw e;
}

Prevention

When it happens

Trigger: Passing a filter with an operator outside the supported set to an Airtable-backed resource — e.g. `{ field: 'price', operator: 'gt', value: 100 }` or `between`/`gte`/`lte`/`startswith` via useTable filters or permanentFilter.

Common situations: Reusing filter UI/config from a REST or Strapi provider app; users picking date-range or numeric comparisons in a table filter dropdown wired to all refine operators.

Related errors


AI-assisted analysis of refinedev/refine@779d52a20e (2026-08-27). Data as JSON: /api/errors/210787cde3df9a3c. Report an issue: GitHub.

Appendix: source

Thrown at packages/airtable/src/utils/generateLogicalFilterFormula.ts:43

    const mappedOperator = {
      contains: "!=",
      ncontains: "=",
    } as const;

    const find = ["FIND", ["LOWER", value], ["LOWER", { field }]] as Formula;

    return [mappedOperator[operator], find, 0];
  }

  if (operator === "null") {
    return ["=", { field }, ["BLANK"]];
  }

  if (operator === "nnull") {
    return ["!=", { field }, ["BLANK"]];
  }

  throw Error(
    `Operator ${operator} is not supported for the Airtable data provider`,
  );
};

View on GitHub (pinned to 779d52a20e)