{"record":{"id":"2369b3d0afe24753","repo":"paperclipai/paperclip","slug":"restart-not-required","errorCode":null,"errorMessage":"restart_not_required","messagePattern":"restart_not_required","errorType":"http","errorClass":null,"httpStatus":409,"severity":"error","filePath":"server/src/routes/health.ts","lineNumber":156,"sourceCode":"  router.post(\"/dev-server/restart\", async (req, res) => {\n    const actorType = \"actor\" in req ? req.actor?.type : null;\n    if (opts.deploymentMode === \"authenticated\" && actorType !== \"board\") {\n      res.status(403).json({ error: \"board_access_required\" });\n      return;\n    }\n\n    const persistedDevServerStatus = readPersistedDevServerStatus();\n    if (!persistedDevServerStatus) {\n      res.status(404).json({ error: \"dev_server_supervisor_unavailable\" });\n      return;\n    }\n\n    const restartRequired =\n      persistedDevServerStatus.dirty ||\n      persistedDevServerStatus.changedPathCount > 0 ||\n      persistedDevServerStatus.pendingMigrations.length > 0;\n    if (!restartRequired) {\n      res.status(409).json({ error: \"restart_not_required\" });\n      return;\n    }\n\n    if (!db) {\n      res.status(503).json({ error: \"database_unavailable\" });\n      return;\n    }\n\n    const requestId = randomUUID();\n    const requestedAt = new Date();\n    const serverInfo = opts.serverInfo ?? getServerInfoSnapshot();\n    const preflightActiveRunIds = await db\n      .select({ id: heartbeatRuns.id })\n      .from(heartbeatRuns)\n      .where(eq(heartbeatRuns.status, \"running\"))\n      .then((rows) => rows.map((row) => row.id));\n    let intent: Awaited<ReturnType<typeof writeHotRestartIntent>> | null = null;\n    try {","sourceCodeStart":138,"sourceCodeEnd":174,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/routes/health.ts#L138-L174","documentation":"4xx sentinel on POST /dev-server/restart: the persisted dev-server status shows the server is neither dirty nor above the changed-path threshold, so a restart is not required and the request is refused.","triggerScenarios":"Thrown at server/src/routes/health.ts:113 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Include the required field(s) in the request path, query, or body as named by the error message, then retry.","Check the API contract in packages/shared validators for the exact required shape of this endpoint."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}