{"record":{"id":"383eabbdb538a25e","repo":"FlowiseAI/Flowise","slug":"invalid-json-in-the-additional-configuration-ex-383eab","errorCode":null,"errorMessage":"Invalid JSON in the Additional Configuration: ${exception}","messagePattern":"Invalid JSON in the Additional Configuration: (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/nodes/recordmanager/SQLiteRecordManager/SQLiteRecordManager.ts","lineNumber":119,"sourceCode":"        ]\n    }\n\n    async init(nodeData: INodeData, _: string, options: ICommonObject): Promise<any> {\n        const _tableName = nodeData.inputs?.tableName as string\n        const tableName = sanitizeRecordManagerTableName(_tableName ? _tableName : 'upsertion_records')\n        const additionalConfig = nodeData.inputs?.additionalConfig as string\n        const _namespace = nodeData.inputs?.namespace as string\n        const namespace = _namespace ? sanitizeRecordManagerNamespace(_namespace) : options.chatflowid\n        const cleanup = nodeData.inputs?.cleanup as string\n        const _sourceIdKey = nodeData.inputs?.sourceIdKey as string\n        const sourceIdKey = _sourceIdKey ? _sourceIdKey : 'source'\n\n        let additionalConfiguration = {}\n        if (additionalConfig) {\n            try {\n                additionalConfiguration = typeof additionalConfig === 'object' ? additionalConfig : JSON.parse(additionalConfig)\n            } catch (exception) {\n                throw new Error('Invalid JSON in the Additional Configuration: ' + exception)\n            }\n            additionalConfiguration = sanitizeDataSourceOptions(additionalConfiguration)\n        }\n\n        const database = validateSQLitePath(path.join(process.env.DATABASE_PATH ?? path.join(getUserHome(), '.flowise'), 'database.sqlite'))\n\n        const sqliteOptions = mergeDataSourceOptions(\n            {\n                database,\n                type: 'sqlite'\n            },\n            additionalConfiguration\n        )\n\n        const args = {\n            sqliteOptions,\n            tableName: tableName\n        }","sourceCodeStart":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/recordmanager/SQLiteRecordManager/SQLiteRecordManager.ts#L101-L137","documentation":"SQLite analog of error 265. Thrown by SQLiteRecordManager.init when additionalConfig is a non-empty string that JSON.parse rejects. Same shape as the Postgres manager: object-pass-through first, then JSON.parse, then this catch with the parse exception appended.","triggerScenarios":"User enters a JS object literal instead of JSON; trailing comma; single quotes; unquoted keys; comment lines; smart quotes from paste.","commonSituations":"Editing the Additional Configuration field by hand without a JSON validator; partial paste; copying from a TypeScript object literal.","solutions":["Paste the value into jsonlint.com; fix reported positions.","Use double-quoted keys and string values; drop trailing commas and comments.","For SQLite you often only need {\"journalMode\":\"WAL\"} or similar - keep it minimal.","Read the appended exception for the exact parse location."],"exampleFix":"// before (invalid)\n{ database: '/tmp/x.db', }\n// after (valid)\n{\"database\":\"/tmp/x.db\"}","handlingStrategy":"validation","validationCode":"function parseAdditionalConfig(raw: string): Record<string, unknown> {\n  try { return JSON.parse(raw) } catch (e) { throw new Error(`additionalConfig not valid JSON: ${(e as Error).message}`) }\n}","typeGuard":"function isJsonString(s: unknown): s is string {\n  if (typeof s !== 'string') return false\n  try { JSON.parse(s); return true } catch { return false }\n}","tryCatchPattern":"try {\n  await sqliteManager.init(nodeData, input, options)\n} catch (e) {\n  if (e instanceof Error && e.message.startsWith('Invalid JSON in the Additional Configuration')) {\n    // surface parse position to user\n  }\n  throw e\n}","preventionTips":["Validate JSON on the client before save.","Prefer minimal additionalConfig (often just {} or {\"journalMode\":\"WAL\"}).","Lint pasted values for JS-only syntax."],"tags":["sqlite","record-manager","json","config","user-input"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}