Closed dmcinnes closed 9 years ago
Hah, see also #32, we is something that we should really get fixed the right way. +1 to get these out of Rollbar for now though.
I guess the right way would be to just proxy the 429 to the client?
I guess the right way would be to just proxy the 429 to the client?
Yeah, exactly. Either bubble these back up to the user and tell them that they're rate limit, or possibly even better, devise a system that puts internal components into different buckets. I tried to do the latter as part of heroku/rfcs#2, but unfortunately never got around to getting the implementation together.
+1 for bubbling the error up to the user. I could add another error view like this one:
https://github.com/heroku/identity/blob/master/views/errors/503.slim
Something along the lines of
You are currently making too many requests to Heroku. Please wait a while and try to log in again.
Thoughts?
@dmcinnes If you're up to making the change, then major +1! Thanks.
Added the 429 template/handler code and tests. Also, it appears the 503 errors were responding with a 500, this should fix that.
@dmcinnes AMAZING! Ship it.
Also, it appears the 503 errors were responding with a 500, this should fix that.
Hah, somebody tried to put in a fix for this awhile back and it never seemed to have worked quite right. Thanks for taking a look!
Currently when a user hitting identity is rate limited in API, we throw a 500 (and spam rollbar). This fixes it to render the 503 error page, "API Unavailable", instead of "Internal Server Error", and no longer log them in Rollbar.
Ready for review @heroku/api