{"record":{"id":"9eeda2042097bb38","repo":"tursodatabase/turso","slug":"unsupported-config","errorCode":"UNSUPPORTED_CONFIG","errorMessage":"Unsupported configuration options: ${optionsList}. Only 'url', 'authToken', and 'remoteEncryptionKey' are supported in the serverless compatibility layer.","messagePattern":"Unsupported configuration options: (.+?)\\. Only 'url', 'authToken', and 'remoteEncryptionKey' are supported in the serverless compatibility layer\\.","errorType":"exception","errorClass":"LibsqlError","httpStatus":null,"severity":"error","filePath":"serverless/javascript/src/compat.ts","lineNumber":212,"sourceCode":"    if (config.offline !== undefined) {\n      unsupportedOptions.push({ key: 'offline', value: config.offline });\n    }\n    if (config.tls !== undefined) {\n      unsupportedOptions.push({ key: 'tls', value: config.tls });\n    }\n    if (config.intMode !== undefined) {\n      unsupportedOptions.push({ key: 'intMode', value: config.intMode });\n    }\n    if (config.fetch !== undefined) {\n      unsupportedOptions.push({ key: 'fetch', value: config.fetch });\n    }\n    if (config.concurrency !== undefined) {\n      unsupportedOptions.push({ key: 'concurrency', value: config.concurrency });\n    }\n\n    if (unsupportedOptions.length > 0) {\n      const optionsList = unsupportedOptions.map(opt => `'${opt.key}'`).join(', ');\n      throw new LibsqlError(\n        `Unsupported configuration options: ${optionsList}. Only 'url', 'authToken', and 'remoteEncryptionKey' are supported in the serverless compatibility layer.`,\n        \"UNSUPPORTED_CONFIG\"\n      );\n    }\n\n    // Validate required options\n    if (!config.url) {\n      throw new LibsqlError(\"Missing required 'url' configuration option\", \"MISSING_URL\");\n    }\n  }\n\n  get closed(): boolean {\n    return this._closed;\n  }\n\n  get protocol(): string {\n    return \"http\";\n  }","sourceCodeStart":194,"sourceCodeEnd":230,"githubUrl":"https://github.com/tursodatabase/turso/blob/6c7252267988c76e632af00a671e4b9788dfae13/serverless/javascript/src/compat.ts#L194-L230","documentation":"The serverless compatibility client only supports three config keys - url, authToken and remoteEncryptionKey - and validateConfig() throws LibsqlError code UNSUPPORTED_CONFIG at construction time if it sees any of: encryptionKey, syncUrl, syncInterval, readYourWrites, offline, tls, intMode, fetch or concurrency. The layer maps onto the HRTB/HTTP protocol, where those options have no meaning, so it rejects them loudly instead of silently ignoring behavior you asked for.","triggerScenarios":"createClient(config) with a config object written for the full @libsql/client - e.g. { url, authToken, intMode: 'bigint' } or a custom fetch function - passed to the serverless compat entry.","commonSituations":"Sharing one config object between a Node app (@libsql/client) and an edge/serverless deployment (this compat layer); copy-pasted snippets that set concurrency or tls; migrating older libsql config with syncUrl/offline flags left in place.","solutions":["Delete the unsupported keys from the config used in serverless deployments - the error message lists exactly which ones it saw","For intMode: handle large integers yourself (BigInt(result.lastInsertRowid) etc.) instead of configuring the mode","For custom fetch: rely on the runtime's global fetch (edge runtimes provide it) rather than injecting one","If you genuinely need those options, run the full @libsql/client on a Node runtime instead of the serverless layer"],"exampleFix":"// before\nconst client = createClient({\n  url: process.env.TURSO_DATABASE_URL!,\n  authToken: process.env.TURSO_AUTH_TOKEN,\n  intMode: 'bigint',\n}); // throws UNSUPPORTED_CONFIG\n\n// after\nconst client = createClient({\n  url: process.env.TURSO_DATABASE_URL!,\n  authToken: process.env.TURSO_AUTH_TOKEN,\n});","handlingStrategy":"validation","validationCode":"const ALLOWED = new Set(['url', 'authToken', 'remoteEncryptionKey']);\nexport function sanitizeConfig(cfg: Record<string, unknown>) {\n  const clean: Record<string, unknown> = {};\n  for (const [k, v] of Object.entries(cfg)) {\n    if (ALLOWED.has(k)) clean[k] = v;\n    else console.warn(`Ignoring unsupported serverless option '${k}'`);\n  }\n  return clean;\n}\nconst client = createClient(sanitizeConfig(sharedConfig) as Config);","typeGuard":"function isSupportedConfig(cfg: Record<string, unknown>): boolean {\n  return Object.keys(cfg).every(k => ['url', 'authToken', 'remoteEncryptionKey'].includes(k));\n}","tryCatchPattern":null,"preventionTips":["Keep a separate, minimal config object for serverless deployments instead of reusing the full libsql config","Document in shared config modules which keys are serverless-safe","If a runtime needs intMode/fetch/concurrency, run @libsql/client on Node rather than the compat layer"],"tags":["serverless","configuration","libsql-compat","validation","constructor"],"backgroundTag":"unsupported-config-option","analyzedSha":"6c7252267988c76e632af00a671e4b9788dfae13","analyzedAt":"2026-08-20T07:02:18.389Z","contentChangedAt":"2026-08-20T07:02:18.389Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}