Discord · infra · fg-0441

Discord bot gets temporarily blocked by Cloudflare after a loop of 401, 403 or 429 responses

Every request fails for a while, including to unrelated routes

Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100

Cause

More than 10,000 invalid requests (401, 403 or 429) in 10 minutes triggers a temporary IP restriction. Shared-scope 429s do not count, but retry loops on bad tokens, missing permissions or 404 webhooks do.

Fix

Stop calling a webhook after a 404, check permissions before calling, and back off on 429 using retry_after and the X-RateLimit-Scope header instead of retrying at once.

Apply

if (res.status === 429) {
  const { retry_after } = await res.json();
  await new Promise(r => setTimeout(r, retry_after * 1000));
} else if (res.status === 404) {
  disableWebhook(webhookId);
}

Affects: Discord REST API, all bots and webhooks, as of 2026-10

Sources

Have your agent know this before it fails

claude mcp add --transport http footgun https://getfootgun.com/api/mcp