Bungie-net / api

Resources for the Bungie.net API
Other
1.22k stars 92 forks source link

GetClanLeaderboards unexpected exception for maxtop #1034

Open kylerberry opened 4 years ago

kylerberry commented 4 years ago

I'm attempting to fetch leaderboards for a clan of 76 members (clanId=882490)

followup: I attempted to get data for another clan with a maxtop = 9999 and it worked perfectly.

Tetron-bng commented 4 years ago

Can you paste the exact URLs you are composing?

kylerberry commented 4 years ago

@Tetron-bng

Not Working: Req: https://www.bungie.net/Platform/Destiny2/Stats/Leaderboards/Clans/882490?modes=4&maxtop=25 Resp:

{"ErrorCode":3,"ThrottleSeconds":0,"ErrorStatus":"UnhandledException","Message":"We've encountered an error, please try again later.","MessageData":{}}

Working: Req: https://www.bungie.net/Platform/Destiny2/Stats/Leaderboards/Clans/882490?modes=4&maxtop=24

note that the only difference is maxtop 24 vs 25

Tetron-bng commented 4 years ago

Interesting. The exception you are seeing means there is probably a coding bug in the Bungie.net server. vthornheart will be able to dig into that.

I have found you can work around this if you narrow the number of stats getting returned using the statid parameter like this: https://www.bungie.net/Platform/Destiny2/Stats/Leaderboards/Clans/882490?modes=4&maxtop=100&statid=lbPrecisionKills

kylerberry commented 4 years ago

@Tetron-bng thanks for looking into it. I can use the proposed workaround for now.