Rick Staa
Rick Staa
> any update? @Parth-1612 unfortunately, we still have to revisit this again. There are problems with both #2459 and #1122 due to how the stats and languages are currently calculated....
As suggested by @anuraghazra on discord, maybe let's change this to using `if-stale-error` https://developer.fastly.com/learning/concepts/stale/#:~:text=stale%2Dif%2Derror%20tells%20Fastly,during%20periods%20of%20server%20instability (see image below).  We can then throw a Vercel error when the PATs are depleted...
> Yes, but let's test it on dummy deployment before going to prod with this 100% 👍🏻.
> Yes, but let's test it on dummy deployment before going to prod with this I currently do not have the time to implement this, but it should be doable...
Not sure if `stale-if-error` is already supported with Vercel (see https://github.com/vercel/vercel/issues/3362).
> I'm not sure if I understand this correctly, but returning a 400 or a 500 error should trigger `stale-if-error` right? There's nothing special we have to do apart from...
Just putting this here for future reference. Fixing this issue will fix our most mentioned bug https://github.com/anuraghazra/github-readme-stats/issues/1515. 👍
If we like this new method, we can also improve it the [fetchers/stats-fetcher.js/totalCommitsFetcher](https://github.com/anuraghazra/github-readme-stats/blob/c5063b92b6e260dcc405a0a4cd27552dc103f8f5/src/fetchers/stats-fetcher.js#L139-L170) so that it throws an error instead of returning `0`. This will fix #1515 and #2358.
Merging this will fix #1515. @qwerty541 I will check this later this week so we can close #1515.
> > I can currently respond with a custom error card and attach a 500 status code or show Vercels own 500 error. I was not able to change Vercels...