{"record":{"id":"89875995fc470a5b","repo":"github/copilot-sdk","slug":"sqlite-is-not-supported-by-this-provider","errorCode":null,"errorMessage":"SQLite is not supported by this provider","messagePattern":"SQLite is not supported by this provider","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nodejs/src/sessionFsProvider.ts","lineNumber":261,"sourceCode":"                return toSessionFsError(err);\n            }\n        },\n        rename: async ({ src, dest }) => {\n            try {\n                await provider.rename(src, dest);\n                return undefined;\n            } catch (err) {\n                return toSessionFsError(err);\n            }\n        },\n        // Unlike the FS methods above, SQLite methods let errors propagate to the JSON-RPC layer\n        // rather than catching and mapping via toSessionFsError. The FS error mapping is specifically\n        // for translating Node.js errno codes (e.g., ENOENT) into SessionFsError, which isn't\n        // meaningful for SQL errors. Letting exceptions propagate preserves the original error\n        // message in the JSON-RPC error response.\n        sqliteQuery: async ({ queryType, query, params: bindParams }) => {\n            if (!provider.sqlite) {\n                throw new Error(\"SQLite is not supported by this provider\");\n            }\n            const result = await provider.sqlite.query(\n                queryType,\n                query,\n                normalizeSqliteParams(bindParams)\n            );\n            return result ?? { rows: [], columns: [], rowsAffected: 0 };\n        },\n        sqliteTransaction: async ({ statements }) => {\n            if (!provider.sqlite?.transaction) {\n                return {\n                    results: [],\n                    error: {\n                        errorClass: \"fatal\",\n                        message: \"SQLite transactions are not supported by this provider\",\n                    },\n                };\n            }","sourceCodeStart":243,"sourceCodeEnd":279,"githubUrl":"https://github.com/github/copilot-sdk/blob/cd8cf15dc3f9e762615790aaed0a771a0f392755/nodejs/src/sessionFsProvider.ts#L243-L279","documentation":"Thrown by the SQLite query handler in createSessionFsAdapter when a sqliteQuery request arrives but the session filesystem provider does not implement the optional `sqlite` capability. The adapter deliberately lets this plain Error propagate so the original message appears in the JSON-RPC error response instead of being remapped to a SessionFsError.","triggerScenarios":"Calling the session-fs sqliteQuery JSON-RPC method against a provider constructed without a `sqlite` property; a custom provider that only implements file operations; provider built by an older factory version predating sqlite support.","commonSituations":"Custom sessionFs provider implementations missing the sqlite interface; running SQL-backed features (journaling, search) against a plain filesystem provider; feature flags enabling sqlite-dependent features on providers that cannot serve them.","solutions":["Implement the `sqlite` capability on your provider (query method) or switch to a provider that supports it","Gate sqliteQuery calls behind a capability check (provider.sqlite presence / advertised features)","Disable or avoid the SQL-backed feature when using a filesystem-only provider"],"exampleFix":"// before\nconst res = await sessionFs.sqliteQuery({ queryType: \"all\", query: \"SELECT 1\" }); // provider has no sqlite\n// after\nif (provider.sqlite) {\n  const res = await sessionFs.sqliteQuery({ queryType: \"all\", query: \"SELECT 1\" });\n} else {\n  // fallback to file-based API or surface unsupported feature\n}","handlingStrategy":"type-guard","validationCode":"if (!provider.sqlite) throw new Error(\"This feature requires a sqlite-capable sessionFs provider\");","typeGuard":"function hasSqlite(p) {\n  return typeof p?.sqlite?.query === \"function\";\n}","tryCatchPattern":"try {\n  return await sessionFs.sqliteQuery({ queryType, query, params });\n} catch (err) {\n  if (err?.message === \"SQLite is not supported by this provider\") {\n    return fileBasedFallback(query);\n  }\n  throw err;\n}","preventionTips":["Verify the provider implements the optional sqlite capability before enabling SQL-backed features","Use a sqlite-capable provider when the app depends on SQL APIs","Feature-flag sqlite usage on a runtime capability check"],"tags":["sqlite","provider","unsupported"],"backgroundTag":"operation-not-supported","analyzedSha":"cd8cf15dc3f9e762615790aaed0a771a0f392755","analyzedAt":"2026-09-09T18:32:31.973Z","contentChangedAt":"2026-09-09T18:32:31.973Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}