From 1046aa3022a69dbc811661e24bb0089f6d3f6ef9 Mon Sep 17 00:00:00 2001 From: Blon Td Date: Fri, 3 Jul 2026 21:38:55 -0400 Subject: [PATCH] fix(leaderboard): handle 400 page out-of-bounds error to fix infinite 'Try Again' footer --- src/client/Api.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/client/Api.ts b/src/client/Api.ts index 82e55f6e00..68dc1a80dd 100644 --- a/src/client/Api.ts +++ b/src/client/Api.ts @@ -391,6 +391,17 @@ export async function fetchPlayerLeaderboard( }); if (!res.ok) { + if (res.status === 400) { + try { + const json = await res.json(); + const message = json?.message ?? json?.error; + if (typeof message === "string" && message.toLowerCase().includes("page")) { + return "reached_limit"; + } + } catch (_) { + // ignore + } + } console.warn( "fetchPlayerLeaderboard: unexpected status", res.status,