arenanet / api-cdi

Collaborative Development Initiative for Public APIs
257 stars 41 forks source link

Error on /v2/commerce/listings #197

Closed Gapplay closed 8 years ago

Gapplay commented 8 years ago

https://api.guildwars2.com/v2/commerce/listings?ids=76663

<Error code="48" module="3" line="389" text="callback (): TypeError: undefined is not a function    TypeError: undefined is not a function at c:\arenanet\lliveweb.327\web\js2api\code\v2\controllers\commerce\listings.js:33:30 at JS.sts.(anonymous function).object.merge.complete (c:\arenanet\lliveweb.327\web\jssrv2\code\request.js:137:13)"/>
lye commented 8 years ago

Yikes, I almost certainly introduced this today while fiddling with the /v2/commerce/listing caches -- there's likely an edge-case I missed. Planning on making some more changes to that tomorrow (since today's changes haven't fixed much), so I'll fix it then.

Sorry about that!

lye commented 8 years ago

This is half-fixed. It now returns ErrUnknown; I'm not sure why it's returning ErrUnknown.

Gapplay commented 8 years ago

https://api.guildwars2.com/v2/commerce/listings?ids=76663,19721 if I use multiple ids, it gives ErrUnknow. That's a problem, I can't use the bulk expansion.

lye commented 8 years ago

Ick, that's fair. The ErrUnknown is a totally unexpected error that needs to be tracked down -- right now receiving it aborts the entire request (rather than forwarding the error to the bulk-expansion code for handling).

Gapplay commented 8 years ago

https://api.guildwars2.com/v2/commerce/listings?page=118&page_size=200 There are many corrupted items. There is no way to request info efficiently ;( Could you remove those ids from https://api.guildwars2.com/v2/commerce/listings ?

lye commented 8 years ago

Whelp, that didn't fix the problem.

They can't really be removed easily -- there's a cache corruption problem somewhere in the trade code that I haven't been able to reproduce outside the live environment. I'm pretty sure I know roughly how to reproduce the problem locally now though, so I'll putter around with it some more and try to get it fixed tomorrow.

lye commented 8 years ago

Okay, I ran a script to figure out every single id that returns an error, then blacklisted them all with a blacklist I added a couple months ago and promptly forgot about (scratch that "they can't be removed easily" bit).

This should be working now; re-open the issue if you find any more ErrUnknowns.

Gapplay commented 8 years ago

That bug is back :( Many Working items have started giving {"text":"ErrUnknown"} https://api.guildwars2.com/v2/commerce/listings?ids=76933

Gapplay commented 8 years ago

could you blacklist them again?

lye commented 8 years ago

Pretty sure those are new items that aren't in the blacklist. I think I've got a better fix that doesn't require a config to be maintained (and it's fairly small) so I'm just going to deploy it.

lye commented 8 years ago

Okay, this should be all fixed from an end-user perspective. I'm gonna leave it open until tomorrow as a reminder that I need to go through and potentially remove that blacklist entirely (this fix should fix the issue that the blacklist was working around).

Gapplay commented 8 years ago

Thank you for your hard work!

lye commented 8 years ago

Whelp, the old blacklist needs to stay in place -- they're all still being returned by the backend. Added some new ones on there too, as per this forum post. Gonna close this one out for now; the underlying bug isn't fixed so this undoubtedly will be back at some point ;_;

Gapplay commented 8 years ago

New ids throwing "ErrUnknown" [78108, 78436]