shields
shields copied to clipboard
Problems with using StackOverflow reputation badge
you experiencing an issue with...
- [x] shields.io
- [ ] My own instance
- [ ] badge-maker NPM package
:beetle: Description
When I use StackOverflow reputation badge without any parameters everything works okay:
But when I add parameters in order to change badge color or shape, it says there's invalid parameters
Also, if I want to change title from stackoverflow reputation
to StackOverflow reputation
:
:link: Link to the badge
:bulb: Possible Solution
¯_(ツ)_/¯
Hm, actually. Even https://img.shields.io/stackexchange/stackoverflow/r/11589183
now says that parameters are invalid
Thanks for the report. Weird! This issue is very strange, and must be related either to the Shields onboard caching logic (or possibly the CDN, though I doubt it). I expect it will resolve itself whenever the bad data is evicted from the cache.
It works fine locally and on staging.
If the underlying issue is the onboard cache, probably the best solution is to remove that cache, something I've wanted to do anyway. (#3368)
Thank you. It did resolve itself for the next day.
I'm seeing this issue intermittently. Right now, every badge on this page shows "invalid parameters". I've also tested on multiple browsers and even computers. It seems random, it will work for several hours and then revert back to "invalid parameters".
Edit: And now they're working again.
Wild speculation, but I wonder if this is a manifestation of https://github.com/badges/shields/issues/3591 ?
from https://api.stackexchange.com/docs/throttle :
Note that exactly what response an application gets (in terms of HTTP code, text, and so on) is undefined when subject to this ban; we consider > 30 request/sec per IP to be very abusive and thus cut the requests off very harshly.
I guess we could be getting rejected with a 400 for making too many requests (which might explain this error and the intermittent behaviour)
I have the same issue, they work and stop working randomly
@chris48s I guess I’m confused that we’re getting “invalid parameter” on this, which sounds like, in addition to needing more rate limit, there’s also a bug in that we return what sounds like a permanent error instead of “unreachable.”
The message "invalid parameters" implies we're getting a 400 response from the upstream API based on the code: https://github.com/badges/shields/blob/1047fd9c7eddef8517eec7d403a602a428e64695/services/stackexchange/stackexchange-reputation.service.js#L66-L68 We don't know why that is happening. It would indeed be conventional for a 400 response to indicate that we are issuing an invalid or erroneous request. It would also be conventional to reject a request with something like a 429 if a rate limit has been exceeded. The reason I suggested the 400 might be rate-limit related in this case is because of that quote from the documentation I posted:
exactly what response an application gets (in terms of HTTP code, text, and so on) is undefined
but I don't really know.
Ah, I gotcha. It’s too bad they seem to send a 400 for both things!
Any update on this?
Let me know if you want some help with the rate limiting.
Yes. We'd love to find out if the issue we're seeing is rate limit related or not. We make all our requests with a user agent starting Shields.io/
if that helps.
Have you registered with https://stackapps.com/? That would get you higher throttling limits. I do see your requests and I'll poke around some more on Monday.
Have you registered with https://stackapps.com/?
No. I was not aware it existed. We're making all our requests with no auth. I'll have a look into this :+1:
PR up at #8539
Has this been resolved because I'm still seeing "invalid parameters" instead of the reputation count?
https://github.com/badges/shields/pull/8539 is still open waiting on review