discord-api-docs icon indicating copy to clipboard operation
discord-api-docs copied to clipboard

Pruning amount in large guilds 502's

Open Jupith opened this issue 4 years ago • 5 comments

When trying to see the number of members that will be kicked from a prune in large guilds it will 502. prune

Jupith avatar May 06 '21 18:05 Jupith

This behavior is known and is unlikely to be fixed. For large guilds we do not have the capability to compute the count quickly enough.

night avatar May 06 '21 18:05 night

@night That sounds pretty reasonable, but then why return a 502 Bad Gateway Error? Why not return an error that says "Computing the prune count is unavailable for large guilds."?

LikeLakers2 avatar May 06 '21 20:05 LikeLakers2

~~@jupith This is so real 🍹~~

noocoke avatar Feb 16 '23 06:02 noocoke

In the over two and a half years since this issue was reopened, the only significant change I've been able to determine is that now a 504 Gateway Time-out (as opposed to a 502 Bad Gateway) error is returned when attempting to fetch the prune count for large guilds.

Given this is consistently reproducible, a more helpful error message & perhaps a note on the documentation page itself (e.g., https://github.com/discord/discord-api-docs/pull/5912) would be nice to have!

BuildBot42 avatar Sep 23 '25 02:09 BuildBot42

Forgot about this issue, but now recall there is actually a workaround for being able to view this information, maybe it’ll be helpful to some who find themselves here.

Viewing your Server Insights on Discord’s Developer Portal shows you quickly and easily.

Link: https://ptb.discord.com/developers/servers/<YOUR_SERVER_ID>/analytics/engagement

I wonder if Discord can solve this issue by using the same endpoint or logic that the Dev Portal’s Server Insights works on, unless that value only periodically updates rather than on demand.

auxtinn avatar Sep 23 '25 02:09 auxtinn