davila7/claude-code-templates · error

Failed to load summary

Error message

Failed to load summary

What it means

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.

Source

Thrown at cli-tool/src/plugin-dashboard.js:625

        await this.loadPluginData();
        res.json({
          marketplaces: (this.marketplaces || []).length,
          plugins: (this.plugins || []).length,
          permissions: {
            agents: (this.permissions?.agents || []).length,
            commands: (this.permissions?.commands || []).length,
            hooks: (this.permissions?.hooks || []).length,
            mcps: (this.permissions?.mcps || []).length,
            total: (this.permissions?.agents || []).length +
                   (this.permissions?.commands || []).length +
                   (this.permissions?.hooks || []).length +
                   (this.permissions?.mcps || []).length
          },
          timestamp: new Date().toISOString()
        });
      } catch (error) {
        console.error('Error loading summary:', error);
        res.status(500).json({ error: 'Failed to load summary' });
      }
    });

    // Main route
    this.app.get('/', (req, res) => {
      res.sendFile(path.join(__dirname, 'plugin-dashboard-web', 'index.html'));
    });
  }

  async startServer() {
    return new Promise((resolve) => {
      this.httpServer = this.app.listen(this.port, async () => {
        console.log(chalk.green(`🔌 Plugin dashboard started at http://localhost:${this.port}`));
        resolve();
      });
    });
  }

View on GitHub (pinned to a0851ed10c)

Solutions

  1. Check server console for 'Error loading summary:' plus the root error
  2. Run the sibling endpoints (/api/plugins, /api/marketplaces, /api/permissions) to isolate which data source is broken
  3. Repair or regenerate the offending config file(s), then restart the dashboard
  4. Reinstall the package if its loaders are out of sync with current config formats
Defensive patterns

Strategy: fallback

Validate before calling

null

Try / catch

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 } }; }

Prevention

When it happens

Trigger: GET /api/summary when loadPluginData() throws for any reason — bad plugin/marketplace/permissions data, missing files, or filesystem errors — before counts can be computed.

Common situations: 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.

Related errors


AI-assisted analysis of davila7/claude-code-templates@a0851ed10c (2026-08-28). Data as JSON: /api/errors/36d3514adf472247. Report an issue: GitHub.