Shields: Problems with using StackOverflow reputation badge

Created on 12 Aug 2020  Ā·  9Comments  Ā·  Source: badges/shields

you experiencing an issue with...

  • [x] [shields.io](https://shields.io/#/)
  • [ ] My own instance
  • [ ] [badge-maker NPM package](https://www.npmjs.com/package/badge-maker)

: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

ĀÆ_(惄)_/ĀÆ

question

All 9 comments

Hm, actually. Even https://img.shields.io/stackexchange/stackoverflow/r/11589183 now says that parameters are invalid

image

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".

image

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!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rominf picture rominf  Ā·  3Comments

stclairdaniel picture stclairdaniel  Ā·  3Comments

PyvesB picture PyvesB  Ā·  3Comments

techtonik picture techtonik  Ā·  3Comments

irgolic picture irgolic  Ā·  3Comments