{"record":{"id":"3ab72332506533b5","repo":"refinedev/refine","slug":"custom-method-is-not-implemented-on-refine-appwr","errorCode":null,"errorMessage":"'custom' method is not implemented on refine-appwrite data provider.","messagePattern":"'custom' method is not implemented on refine-appwrite data provider\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/appwrite/src/dataProvider.ts","lineNumber":199,"sourceCode":"            variables as unknown as object,\n            [...readPermissions, ...writePermissions],\n          ),\n        ),\n      );\n      return {\n        data: data.map(({ $id, ...restData }) => ({\n          id: $id,\n          ...restData,\n        })),\n      } as any;\n    },\n    getApiUrl: () => {\n      throw Error(\n        \"'getApiUrl' method is not implemented on refine-appwrite data provider.\",\n      );\n    },\n    custom: () => {\n      throw Error(\n        \"'custom' method is not implemented on refine-appwrite data provider.\",\n      );\n    },\n  };\n};\n","sourceCodeStart":181,"sourceCodeEnd":205,"githubUrl":"https://github.com/refinedev/refine/blob/779d52a20e29b0307ac0df04d135beba434370dc/packages/appwrite/src/dataProvider.ts#L181-L205","documentation":"The Appwrite data provider does not implement the optional `custom` method of the refine data provider contract; calling it (typically via `useCustom`/`useCustomMutation`) throws `Error(\"'custom' method is not implemented on refine-appwrite data provider.\")`. Appwrite operations go through its typed SDK, so arbitrary URL/method requests aren't supported through this provider.","triggerScenarios":"Using `useCustom` or `useCustomMutation` hooks in a component while the resource's data provider is refine-appwrite; the hook delegates to provider.custom which throws.","commonSituations":"Porting useCustom-based features (health checks, custom endpoints, aggregated queries) from REST providers into an Appwrite app; attempting to hit Appwrite functions via refine hooks.","solutions":["Call Appwrite SDK functions (or Appwrite Functions via sdk.functions.createExecution) directly with react-query instead of useCustom","Expose the needed data as a normal Appwrite collection/database query and use useList/useOne","If a REST surface exists, attach a second dataProvider that supports custom and point those resources at it"],"exampleFix":"// before\nconst { data } = useCustom({ url: '/functions/health', method: 'get' });\n// after\nconst { data } = useQuery({\n  queryKey: ['health'],\n  queryFn: () => appwriteFunctions.createExecution('health'),\n});","handlingStrategy":"type-guard","validationCode":"if (typeof dataProvider.custom !== 'function') {\n  // call Appwrite SDK directly instead of useCustomMutation\n}","typeGuard":"const supportsCustom = (dp: unknown): dp is { custom: Function } =>\n  typeof (dp as any)?.custom === 'function';","tryCatchPattern":"try {\n  await provider.custom(...args);\n} catch (e) {\n  if (/not implemented/.test((e as Error).message)) useAppwriteSdk();\n  else throw e;\n}","preventionTips":["Prefer the Appwrite SDK for anything outside CRUD","Add a capabilities map per provider when mixing multiple providers"],"tags":["appwrite","use-custom","not-implemented","data-provider","refine"],"backgroundTag":"provider-method-not-implemented","analyzedSha":"779d52a20e29b0307ac0df04d135beba434370dc","analyzedAt":"2026-08-27T11:15:25.854Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}