{"record":{"id":"7b2733136b1775ec","repo":"refinedev/refine","slug":"not-implemented-custom-on-data-provider-7b2733","errorCode":null,"errorMessage":"Not implemented custom on data provider.","messagePattern":"Not implemented custom on data provider\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/src/hooks/data/useCustomMutation.ts","lineNumber":162,"sourceCode":"      config,\n    }: useCustomMutationParams<TData, TError, TVariables>) => {\n      const combinedMeta = getMeta({\n        meta: meta,\n      });\n\n      const { custom } = dataProvider(dataProviderName);\n\n      if (custom) {\n        return custom<TData>({\n          url,\n          method,\n          payload: values,\n          meta: combinedMeta,\n          headers: { ...config?.headers },\n        });\n      }\n\n      throw Error(\"Not implemented custom on data provider.\");\n    },\n    onSuccess: (data, variables, context) => {\n      const {\n        successNotification: successNotificationFromProp,\n        config,\n        meta,\n      } = variables;\n\n      const notificationConfig =\n        typeof successNotificationFromProp === \"function\"\n          ? successNotificationFromProp(data, {\n              ...config,\n              ...(meta || {}),\n            })\n          : successNotificationFromProp;\n\n      handleNotification(notificationConfig);\n","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/refinedev/refine/blob/779d52a20e29b0307ac0df04d135beba434370dc/packages/core/src/hooks/data/useCustomMutation.ts#L144-L180","documentation":"Thrown inside `useCustomMutation`'s mutationFn in @refinedev/core when the resolved data provider has no `custom` method. The hook's mutation function tries `dataProvider.custom(...)`; if the method is absent, execution falls through to `throw Error(\"Not implemented custom on data provider.\")`, which surfaces as a rejected mutation error in react-query.","triggerScenarios":"Invoking `mutate()` from `useCustomMutation({ url, method: 'post', values })` where the active (or named) data provider does not implement `custom` — e.g. airtable, appwrite, or a hand-rolled provider missing the optional method.","commonSituations":"Copy-pasting a useCustomMutation call (webhook trigger, custom endpoint POST) into an app whose provider doesn't support it; custom in-house providers that only implemented the required CRUD methods.","solutions":["Add a `custom` implementation to your custom data provider delegating to fetch/your SDK","Use a provider that supports custom for this operation via dataProviderName","Replace with a direct mutation using useMutation + fetch/SDK"],"exampleFix":"// before (component with appwrite provider)\nconst { mutate } = useCustomMutation({ url: '/notify', method: 'post' });\n// after\nconst { mutate } = useMutation({\n  mutationFn: (payload) => fetch('/notify', {\n    method: 'POST',\n    body: JSON.stringify(payload),\n  }),\n});","handlingStrategy":"type-guard","validationCode":"if (typeof dataProvider.custom !== 'function') {\n  // wire useMutation + fetch instead of useCustomMutation\n}","typeGuard":"const supportsCustom = (dp: unknown): dp is { custom: (o: any) => Promise<any> } =>\n  typeof (dp as any)?.custom === 'function';","tryCatchPattern":"useCustomMutation(...).mutate(payload, {\n  onError: (e) => {\n    if (/Not implemented custom/.test(e.message)) useDirectMutation(payload);\n    else throw e;\n  },\n});","preventionTips":["Implement `custom` in custom in-house providers from the start","Gate useCustomMutation UI behind a provider-capability check"],"tags":["use-custom-mutation","data-provider","not-implemented","refine","hooks"],"backgroundTag":"provider-method-not-implemented","analyzedSha":"779d52a20e29b0307ac0df04d135beba434370dc","analyzedAt":"2026-08-27T11:15:25.854Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}