refinedev/refine · warning · Error

Not implemented on refine-supabase data provider.

Error message

Not implemented on refine-supabase data provider.

What it means

The Supabase data provider intentionally does not implement getApiUrl() because access goes through the supabase-js client, not a raw REST base URL. Calling it throws to make the gap explicit rather than returning a misleading value.

Source

Thrown at packages/supabase/src/dataProvider/index.ts:257

            query.match({ id });
          }

          const { data, error } = await query;
          if (error) {
            return handleError(error);
          }

          return (data || [])[0] as any;
        }),
      );

      return {
        data: response,
      };
    },

    getApiUrl: () => {
      throw Error("Not implemented on refine-supabase data provider.");
    },

    custom: () => {
      throw Error("Not implemented on refine-supabase data provider.");
    },
  };
};

View on GitHub (pinned to 779d52a20e)

Solutions

  1. Remove the getApiUrl() call; talk to Supabase via the supabase-js client or your stored SUPABASE_URL
  2. If code requires getApiUrl, override it by spreading the provider and returning your Supabase REST URL (https://<project>.supabase.co/rest/v1)

Example fix

// before
const url = dataProvider.getApiUrl(); // throws

// after
const url = "https://xyzcompany.supabase.co/rest/v1";
// or:
const provider = { ...supabaseDataProvider, getApiUrl: () => "https://xyzcompany.supabase.co/rest/v1" };
Defensive patterns

Strategy: fallback

Validate before calling

const apiUrl = "getApiUrl" in dataProvider ? (() => { try { return dataProvider.getApiUrl(); } catch { return SUPABASE_URL; } })() : SUPABASE_URL;

Try / catch

try { dataProvider.getApiUrl(); } catch (e) { if (String(e).includes("Not implemented")) { /* use SUPABASE_URL or rest endpoint */ } else throw e; }

Prevention

When it happens

Trigger: Calling dataProvider.getApiUrl() from @refinedev/supabase, e.g. when porting code from the Strapi/REST providers or when a helper assumes a REST API base.

Common situations: Migrating a Refine app from a REST provider to Supabase and forgetting to remove getApiUrl() calls; third-party hooks that call getApiUrl() internally.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


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