R2Northstar / NorthstarMasterServer

Master server for Northstar
MIT License
92 stars 33 forks source link

More descriptive errors for stryder response #85

Closed ASpoonPlaysGames closed 2 years ago

ASpoonPlaysGames commented 2 years ago

I'm not sure if stryder can send anything potentially sensitive in the response that we dont want to expose to clients, but these errors don't get logged anyway (except when using https://github.com/R2Northstar/NorthstarLauncher/pull/180 ) so for debugging I don't think it's an issue?

ASpoonPlaysGames commented 2 years ago

Should help with #76

barnabwhy commented 2 years ago

If you want to test if it's a ratelimit, just send lots of auth requests to the stryder endpoint. It'd probably work using the same token repeatedly.

ASpoonPlaysGames commented 2 years ago

Thing is I don't know if its a ratelimit or something else, I don't have the data on how many requests we send and stuff. There most likely is a ratelimit, but whether we are hitting it or not isn't something I can really test locally without some more information.

Either way, having 2 different problems use the same response isn't particularly good, and can potentially be misleading. The question becomes should we include the stryder response with the error that we send back to clients?

ASpoonPlaysGames commented 2 years ago

Just tested, on an error stryder gives back malformed JSON, thanks stryder? (Also tokens are single use it seems so i cant try get ratelimited locally particularly easily) {"success": false, "status": "400", "error": "{"error":"invalid_grant","error_description":"code is invalid","code":100100}"}

uniboi commented 2 years ago

It would be so incredibly cool if someone could merge this so it's possible to investigate the Ms issues further since this literally has no way to break anything