{"record":{"id":"19e31c12df81541c","repo":"FlowiseAI/Flowise","slug":"error-listing-tablename-19e31c","errorCode":null,"errorMessage":"Error listing ${tableName}","messagePattern":"Error listing (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/nodes/memory/AgentMemory/SQLiteAgentMemory/sqliteSaver.ts","lineNumber":186,"sourceCode":"                                checkpoint_id: row.checkpoint_id\n                            }\n                        },\n                        checkpoint: (await this.serde.parse(row.checkpoint)) as Checkpoint,\n                        metadata: (await this.serde.parse(row.metadata)) as CheckpointMetadata,\n                        parentConfig: row.parent_id\n                            ? {\n                                  configurable: {\n                                      thread_id: row.thread_id,\n                                      checkpoint_id: row.parent_id\n                                  }\n                              }\n                            : undefined\n                    }\n                }\n            }\n        } catch (error) {\n            console.error(`Error listing ${tableName}`, error)\n            throw new Error(`Error listing ${tableName}`)\n        } finally {\n            await dataSource.destroy()\n        }\n    }\n\n    async put(config: RunnableConfig, checkpoint: Checkpoint, metadata: CheckpointMetadata): Promise<RunnableConfig> {\n        const dataSource = await this.getDataSource()\n        await this.setup(dataSource)\n\n        if (!config.configurable?.checkpoint_id) return {}\n        try {\n            const queryRunner = dataSource.createQueryRunner()\n            const row = [\n                config.configurable?.thread_id || this.threadId,\n                checkpoint.id,\n                config.configurable?.checkpoint_id,\n                this.serde.stringify(checkpoint),\n                this.serde.stringify(metadata)","sourceCodeStart":168,"sourceCodeEnd":204,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/memory/AgentMemory/SQLiteAgentMemory/sqliteSaver.ts#L168-L204","documentation":"Thrown by SQLiteSaver.list() async generator when the SELECT listing query fails. Entire generator is one try block; finally destroys the dataSource.","triggerScenarios":"Iterating list() when the table is missing, schema drifts, file is locked, or limit/before parameters are malformed.","commonSituations":"History-listing UI flows failing after upgrade. Locked SQLite under parallel reads. Wrong tableName.","solutions":["Inspect console.error for the underlying SQLite error code.","Migrate/recreate the checkpoints table.","Confirm limit is a positive number and before (if any) carries a string checkpoint_id.","Tune busy_timeout / WAL to reduce read-lock contention.","Maintainer: rethrow with cause."],"exampleFix":"// before\n} catch (error) {\n    console.error(`Error listing ${tableName}`, error)\n    throw new Error(`Error listing ${tableName}`)\n}\n// after\n} catch (error) {\n    throw new Error(`Error listing ${tableName}: ${(error as Error).message}`, { cause: error })\n}","handlingStrategy":"try-catch","validationCode":"function validateListArgs(limit?: number, before?: { configurable?: { checkpoint_id?: unknown } }) {\n  if (limit !== undefined && (!Number.isInteger(limit) || limit <= 0)) throw new Error('limit must be a positive integer')\n  if (before && before.configurable?.checkpoint_id !== undefined && typeof before.configurable.checkpoint_id !== 'string') {\n    throw new Error('before.configurable.checkpoint_id must be a string')\n  }\n}","typeGuard":"function isSqliteListError(e: unknown): boolean {\n  return e instanceof Error && /^Error listing .+$/.test(e.message)\n}","tryCatchPattern":"try {\n  for await (const tuple of sqliteSaver.list(config, limit, before)) { /* ... */ }\n} catch (e) {\n  if (e instanceof Error && /Error listing/.test(e.message)) {\n    // verify table/schema; enable WAL/busy_timeout; check file perms\n  }\n  throw e\n}","preventionTips":["Always pass an explicit limit to bound list scans.","Run SQLite in WAL mode for concurrent reader/list workloads.","Keep the schema migrated."],"tags":["sqlite","query","list","error-masking","generator"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}