{"record":{"id":"36d3514adf472247","repo":"davila7/claude-code-templates","slug":"failed-to-load-summary","errorCode":null,"errorMessage":"Failed to load summary","messagePattern":"Failed to load summary","errorType":"http","errorClass":null,"httpStatus":500,"severity":"error","filePath":"cli-tool/src/plugin-dashboard.js","lineNumber":625,"sourceCode":"        await this.loadPluginData();\n        res.json({\n          marketplaces: (this.marketplaces || []).length,\n          plugins: (this.plugins || []).length,\n          permissions: {\n            agents: (this.permissions?.agents || []).length,\n            commands: (this.permissions?.commands || []).length,\n            hooks: (this.permissions?.hooks || []).length,\n            mcps: (this.permissions?.mcps || []).length,\n            total: (this.permissions?.agents || []).length +\n                   (this.permissions?.commands || []).length +\n                   (this.permissions?.hooks || []).length +\n                   (this.permissions?.mcps || []).length\n          },\n          timestamp: new Date().toISOString()\n        });\n      } catch (error) {\n        console.error('Error loading summary:', error);\n        res.status(500).json({ error: 'Failed to load summary' });\n      }\n    });\n\n    // Main route\n    this.app.get('/', (req, res) => {\n      res.sendFile(path.join(__dirname, 'plugin-dashboard-web', 'index.html'));\n    });\n  }\n\n  async startServer() {\n    return new Promise((resolve) => {\n      this.httpServer = this.app.listen(this.port, async () => {\n        console.log(chalk.green(`🔌 Plugin dashboard started at http://localhost:${this.port}`));\n        resolve();\n      });\n    });\n  }\n","sourceCodeStart":607,"sourceCodeEnd":643,"githubUrl":"https://github.com/davila7/claude-code-templates/blob/a0851ed10c7c60463dac8cfaaca124cf32d5804d/cli-tool/src/plugin-dashboard.js#L607-L643","documentation":"HTTP 500 from GET /api/summary in the plugin dashboard when aggregating counts (plugins, marketplaces, permissions tools/agents/mcps) fails. As with the sibling endpoints, it's a loader failure surfaced through a catch block.","triggerScenarios":"GET /api/summary when loadPluginData() throws for any reason — bad plugin/marketplace/permissions data, missing files, or filesystem errors — before counts can be computed.","commonSituations":"Any single malformed config file breaks the whole summary; dashboard opened after an interrupted install left half-written JSON; environment where the config directory is not readable.","solutions":["Check server console for 'Error loading summary:' plus the root error","Run the sibling endpoints (/api/plugins, /api/marketplaces, /api/permissions) to isolate which data source is broken","Repair or regenerate the offending config file(s), then restart the dashboard","Reinstall the package if its loaders are out of sync with current config formats"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"null","typeGuard":null,"tryCatchPattern":"try { summary = await getSummary(); } catch { /* render zeros + error banner rather than blank page */ summary = { counts: { plugins: 0, marketplaces: 0, tools: 0, agents: 0, mcps: 0 } }; }","preventionTips":["Probe /api/plugins, /api/marketplaces, /api/permissions individually to isolate the failing source","Regenerate configs instead of hand-editing when formats change","Restart the dashboard after repairing config files"],"tags":["http-500","express","summary","aggregation"],"backgroundTag":"internal-server-error","analyzedSha":"a0851ed10c7c60463dac8cfaaca124cf32d5804d","analyzedAt":"2026-08-28T14:11:56.058Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}