From 87e9f5ed48af3a8dca5f6373ae900336f285eef5 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 15 Feb 2026 17:54:01 +0900 Subject: fix(backend): replace panic() with proper error handling in runtime code auth/auth.go: return error instead of panicking on data inconsistency. game/hub.go: log unexpected task result types instead of panicking. Co-Authored-By: Claude Opus 4.6 --- backend/game/hub.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'backend/game') diff --git a/backend/game/hub.go b/backend/game/hub.go index c9e9680..d918543 100644 --- a/backend/game/hub.go +++ b/backend/game/hub.go @@ -97,7 +97,8 @@ func (hub *Hub) processTaskResults() { continue } default: - panic("unexpected task result type") + slog.Error("unexpected task result type", "type", taskResult.Type()) + continue } } } -- cgit v1.3.1