Bungie-net / api

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

No Response set on 'successful' get activity definition call for some instances #1092

Open aquarion opened 4 years ago

aquarion commented 4 years ago

This seems to be since the 2.4.0 release, but for some activities I'm getting a "successful" result from a DestinyActivityDefinition call, but without any Response section.

Some debug output follows:

2019-10-12 09:19:43,657 [INFO] [Destiny2] Hello instance 2183066491
2019-10-12 09:19:43,657 [INFO] [Destiny2] Making a call to /Destiny2/Manifest/DestinyActivityDefinition/2183066491/
2019-10-12 09:19:43,658 [INFO] [requests.packages.urllib3.connectionpool] Starting new HTTPS connection (1): www.bungie.net
2019-10-12 09:19:43,828 [DEBUG] [requests.packages.urllib3.connectionpool] "GET /Platform//Destiny2/Manifest/DestinyActivityDefinition/2183066491/ HTTP/1.1" 200 101
2019-10-12 09:19:43,833 [ERROR] [Destiny2] No Response Returned. Received: {u'ErrorCode': 1, u'Message': u'Ok', u'ErrorStatus': u'Success', u'ThrottleSeconds': 0, u'MessageData': {}}
vthornheart-bng commented 4 years ago

Hmm, that definition doesn't appear to exist (anymore?). Where'd you get that hash, just out of curiosity? Is it a retired activity?

I will file a bug for the fact that it didn't return a 404. It should have returned "Not Found" to you for this nonexistent definition!

aquarion commented 4 years ago

That's from the character activities list, admittedly for a character who hasn't been played in a while, which came from /Destiny2/{membershipType}/Account/{membershipId}/Character/{characterId}/Stats/Activities/

Code is https://github.com/aquarion/Lifestream/blob/master/imports/destiny2.py#L318-L330

vthornheart-bng commented 4 years ago

Can you give me the membership type, membership ID, and character ID of that character? I want to take a peek at the data that comes back for them - ideally, even a character that hasn't played in a while shouldn't return data for an activity with an invalid hash. It could be a sign that something's wrong with that activities data, or that there's assumptions about old characters that we shouldn't be making on our end!

aquarion commented 4 years ago

Sure, that full called path is /Platform//Destiny2/3/Account/4611686018470937253/Character/2305843009299978986/Stats/Activities/?count=100&mode=None&page=0 and the activities returning nothing are:


2019-10-14 20:16:05,662 [ERROR] [Destiny2] /Destiny2/Manifest/DestinyActivityDefinition/2702476101/
2019-10-14 20:16:05,663 [ERROR] [Destiny2] {u'ErrorCode': 1, u'Message': u'Ok', u'ErrorStatus': u'Success', u'ThrottleSeconds': 0, u'MessageData': {}}
2019-10-14 20:16:06,922 [ERROR] [Destiny2] /Destiny2/Manifest/DestinyActivityDefinition/2266954523/
2019-10-14 20:16:06,922 [ERROR] [Destiny2] {u'ErrorCode': 1, u'Message': u'Ok', u'ErrorStatus': u'Success', u'ThrottleSeconds': 0, u'MessageData': {}}
2019-10-14 20:16:10,185 [ERROR] [Destiny2] /Destiny2/Manifest/DestinyActivityDefinition/2183066491/
2019-10-14 20:16:10,186 [ERROR] [Destiny2] {u'ErrorCode': 1, u'Message': u'Ok', u'ErrorStatus': u'Success', u'ThrottleSeconds': 0, u'MessageData': {}}```
vthornheart-bng commented 4 years ago

Oh, I see! I didn't notice this was historical stats. Yes, that makes sense then, good deal. Unfortunately, we don't have control over whether activities get retired from the game content - and if they do, we currently lose them in the API as well.

I filed a bug to fix it so it returns a Not Found error for now!

I have a theoretical hope for a future where we preserve dead game content somewhere, but it's always been a speculative enhancement that we've never had time to work on. Hopefully we can do that in the future!

aquarion commented 4 years ago

That kind of low priority, high hanging fruit doesn't ever seem very likely :)

Thanks for filing the bug report, once it responds with an error my error checking should just catch it.

vthornheart-bng commented 4 years ago

Aye, unfortunately so!

Cool, good deal.