{"record":{"id":"377b3cec3ac19d5c","repo":"paperclipai/paperclip","slug":"config-at-configpath-does-not-define-a-database","errorCode":null,"errorMessage":"Config at ${configPath} does not define a database connection string.","messagePattern":"Config at (.+?) does not define a database connection string\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/routines.ts","lineNumber":216,"sourceCode":"      const adminConnectionString = `postgres://paperclip:paperclip@127.0.0.1:${embeddedHandle.port}/postgres`;\n      await ensurePostgresDatabase(adminConnectionString, \"paperclip\");\n      const connectionString = `postgres://paperclip:paperclip@127.0.0.1:${embeddedHandle.port}/paperclip`;\n      await applyPendingMigrations(connectionString);\n      const db = createDb(connectionString) as ClosableDb;\n      return {\n        db,\n        stop: async () => {\n          await closeDb(db);\n          if (embeddedHandle?.startedByThisProcess) {\n            await embeddedHandle.stop().catch(() => undefined);\n          }\n        },\n      };\n    }\n\n    const connectionString = nonEmpty(config.database.connectionString);\n    if (!connectionString) {\n      throw new Error(`Config at ${configPath} does not define a database connection string.`);\n    }\n\n    await applyPendingMigrations(connectionString);\n    const db = createDb(connectionString) as ClosableDb;\n    return {\n      db,\n      stop: async () => {\n        await closeDb(db);\n      },\n    };\n  } catch (error) {\n    if (embeddedHandle?.startedByThisProcess) {\n      await embeddedHandle.stop().catch(() => undefined);\n    }\n    throw error;\n  }\n}\n","sourceCodeStart":198,"sourceCodeEnd":234,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/cli/src/commands/routines.ts#L198-L234","documentation":"The loaded config's database section does not define a usable connection string (nor embedded mode), so routines cannot construct a DB client.","triggerScenarios":"Thrown at cli/src/commands/routines.ts:216 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add a database connection string (DATABASE_URL) to the config or adjacent .env."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}