{"record":{"id":"8c120066527d477d","repo":"ruvnet/ruflo","slug":"detail-expired-or-not-found","errorCode":null,"errorMessage":"Detail expired or not found","messagePattern":"Detail expired or not found","errorType":"http","errorClass":null,"httpStatus":404,"severity":"error","filePath":"ruflo/src/mcp-bridge/index.js","lineNumber":1597,"sourceCode":"  res.write('data: [DONE]\\n\\n');\n  res.end();\n\n  // Clean up detail store after 5 minutes\n  const detailTTL = parseInt(process.env.AUTOPILOT_DETAIL_TTL || '300000', 10);\n  setTimeout(() => {\n    for (const [key] of detailStore) {\n      if (key.startsWith('dt_')) detailStore.delete(key);\n    }\n  }, detailTTL);\n}\n\n// Lazy detail loading endpoint\napp.get('/autopilot/detail/:token', (req, res) => {\n  const content = detailStore.get(req.params.token);\n  if (content) {\n    res.json({ content });\n  } else {\n    res.status(404).json({ error: 'Detail expired or not found' });\n  }\n});\n\n// =============================================================================\n// CHAT COMPLETIONS PROXY\n// =============================================================================\n\napp.post(\"/chat/completions\", async (req, res) => {\n  const model = req.body?.model;\n  const providerName = resolveProvider(model);\n  const provider = PROVIDER_ROUTES[providerName];\n  const apiKey = provider.getKey();\n\n  if (!apiKey) return res.status(401).json({ error: { message: `No API key for provider: ${providerName}` } });\n\n  // Inject comprehensive system prompt as the first message\n  const body = { ...req.body };\n  if (body.messages && Array.isArray(body.messages)) {","sourceCodeStart":1579,"sourceCodeEnd":1615,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/ruflo/src/mcp-bridge/index.js#L1579-L1615","documentation":"GET /autopilot/detail/:token found no entry in detailStore for the token. Lazy-loaded detail blobs are evicted on a TTL sweep (AUTOPILOT_DETAIL_TTL, default 5 minutes) or the token is wrong — the detail content is no longer (or never) available and the client should re-render without it or re-request the summary.","triggerScenarios":"Thrown at ruflo/src/mcp-bridge/index.js:1597 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the referenced identifier exists before use (list available items and match against user input).","Return a clear 404-style error listing valid identifiers, and have the caller retry with an existing id."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}