Skip to content

fix(api): serve cached stats when Hypixel fails - #985

Open
ugcodrr wants to merge 11 commits into
fix/one-line-bug-fixesfrom
fix/hypixel-rate-limit-fallback
Open

ugcodrr wants to merge 11 commits into
fix/one-line-bug-fixesfrom
fix/hypixel-rate-limit-fallback

Conversation

@ugcodrr

@ugcodrr ugcodrr commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Description: When Hypixel rate limited Statsify or stopped responding, the API told users the player didn't exist.

  1. Player, guild and session lookups return the cached copy when Hypixel fails, with a new hypixelUnavailable flag.
  2. Session resets and new sessions refuse instead of starting from cached stats.
  3. With nothing cached, the API answers a 503 "hypixel" error and the bot shows "Hypixel API Unavailable".

The pause after a 429 is in #1044.

#1044 is stacked on this PR.

Testing: with a wrong hypixelApi.key, /bedwars for a player looked up earlier still shows stats, and an unknown player shows "Hypixel API Unavailable".

Depends on #926

Second merge batch with #1044 and #988, after #926 has merged.

@vercel

vercel Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
statsify Ignored Ignored Preview Nov 5, 2026 8:19am UTC

@ugcodrr
ugcodrr force-pushed the fix/hypixel-rate-limit-fallback branch from dcecd3f to 1397116 Compare October 29, 2026 21:14
@ugcodrr ugcodrr changed the title fix(api): serve cached stats and explain rate limits when Hypixel throttles us fix(api): serve cached stats when Hypixel fails Oct 29, 2026
@ugcodrr
ugcodrr force-pushed the fix/hypixel-rate-limit-fallback branch from 1397116 to 0623a34 Compare October 30, 2026 00:07
@ugcodrr
ugcodrr changed the base branch from fix/guild-cache-on-hypixel-failure to fix/guildless-guild-cache October 30, 2026 00:08
@ugcodrr
ugcodrr force-pushed the fix/hypixel-rate-limit-fallback branch from 0623a34 to c51c585 Compare October 30, 2026 03:31
@ugcodrr
ugcodrr changed the base branch from fix/guildless-guild-cache to fix/one-line-bug-fixes October 30, 2026 03:31
@ugcodrr
ugcodrr force-pushed the fix/hypixel-rate-limit-fallback branch from c51c585 to dcd4835 Compare October 31, 2026 21:16
@ugcodrr
ugcodrr added this pull request to stack #1068 October 31, 2026 21:16
@vercel

vercel Bot commented Nov 3, 2026

Copy link
Copy Markdown

Deployment failed for project statsify with the following error:

Too many requests - try again in 5 minutes (more than 60, code: "api-deployments-flood").

Learn More: https://vercel.com/docs/limits#rate-limits

This branch was previously deployed

1 inactive (outdated) deployment
Preview — fc3bc68e Deployed Oct 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant