organization.acceptInvitation is throwing exception on sqlite - d1

ERROR Error D1_ERROR: near "where": syntax error at offset 22: SQLITE_ERROR Better Auth at processTicksAndRejections (node:internal/process/task_queues:95:5) at D1PreparedQuery.all (node_modules/src/d1/session.ts:194:16) at withReturning (node_modules/better-auth/dist/adapters/drizzle.js:1:8808) at Object.update (node_modules/better-auth/dist/adapters/drizzle.js:1:10079) at s (node_modules/better-auth/dist/index.js:83:12739) at Object.updateSession (node_modules/better-auth/dist/index.js:83:16442) at Object.setActiveOrganization (node_modules/better-auth/dist/plugins.js:83:25734) at node_modules/better-auth/dist/plugins.js:83:31460
1 Reply
anand248
anand248OP5mo ago
Want to close above bug. I was missing activeOrganizationId column in session table.

Did you find this page helpful?