aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/game
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-02-15 17:54:01 +0900
committernsfisis <nsfisis@gmail.com>2026-02-15 17:54:01 +0900
commit87e9f5ed48af3a8dca5f6373ae900336f285eef5 (patch)
tree6b8ada3c17d874cbd2627a61c00df83d38da2c8a /backend/game
parent557b238e88189e1314c39af82d77c94ba9dbd19e (diff)
downloadphperkaigi-2026-albatross-87e9f5ed48af3a8dca5f6373ae900336f285eef5.tar.gz
phperkaigi-2026-albatross-87e9f5ed48af3a8dca5f6373ae900336f285eef5.tar.zst
phperkaigi-2026-albatross-87e9f5ed48af3a8dca5f6373ae900336f285eef5.zip
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 <noreply@anthropic.com>
Diffstat (limited to 'backend/game')
-rw-r--r--backend/game/hub.go3
1 files changed, 2 insertions, 1 deletions
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
}
}
}