From 0b8560c2c28561ccd9ae1865aff918f218c883f2 Mon Sep 17 00:00:00 2001 From: archie Date: Sun, 26 Jul 2026 20:08:20 +0000 Subject: [PATCH] fix: handleSummary ignores errors from WorkflowStats/StageStats/TokensByDay (archie) Fixes #53 --- internal/webui/webui.go | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/internal/webui/webui.go b/internal/webui/webui.go index 4b97cf629..ccc4f3069 100644 --- a/internal/webui/webui.go +++ b/internal/webui/webui.go @@ -84,9 +84,21 @@ func (s *Server) handleSummary(w http.ResponseWriter, r *http.Request) { http.Error(w, err.Error(), 500) return } - workflows, _ := s.Store.WorkflowStats(ctx) - stages, _ := s.Store.StageStats(ctx) - days, _ := s.Store.TokensByDay(ctx, 14) + workflows, err := s.Store.WorkflowStats(ctx) + if err != nil { + http.Error(w, err.Error(), 500) + return + } + stages, err := s.Store.StageStats(ctx) + if err != nil { + http.Error(w, err.Error(), 500) + return + } + days, err := s.Store.TokensByDay(ctx, 14) + if err != nil { + http.Error(w, err.Error(), 500) + return + } writeJSON(w, map[string]any{ "statuses": statuses, "workflows": workflows, "stages": stages, "tokens_by_day": days,