skalnik / aqi-wtf

😷 WTF is the AQI near me right now?!
https://aqi.wtf
MIT License
44 stars 12 forks source link

Make error page a bit more useful #31

Closed obra closed 3 years ago

obra commented 3 years ago

By the time we've gotten to the error page, we almost always have a lat/lon. We could at least throw a link to the purpleair map there.

skalnik commented 3 years ago

Hm, I guess #34 really addressed https://github.com/skalnik/aqi-wtf/issues/32 more than this. Reopening for tracking to do some more useful action if we get an error.

skalnik commented 3 years ago

Another idea floated by @sshirokov last night is to just regularly try again. Usually the errors resolve themselves pretty quickly, or it's a rate limit that goes away with time. Just continuing to try to refetch the data every second or so (or maybe exponential back off) could go a long way to resolving this.

obra commented 3 years ago

I would strongly caution against deploying -without- exponential backoff. But yeah, retrying makes sense. As might clearing the locally stored state if:

1) The error was not a rate-limit error 2) we have failed some number of times in a row.

But we're going to end up with errors not related to connectivity blips and forcing reloads in those cases may just cause more trouble.

On Thu, Sep 10, 2020, at 2:46 PM, Mike Skalnik wrote:

Another idea floated by @sshirokov https://github.com/sshirokov last night is to just regularly try again. Usually the errors resolve themselves pretty quickly, or it's a rate limit that goes away with time. Just continuing to try to refetch the data every second or so (or maybe exponential back off) could go a long way to resolving this.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/skalnik/aqi-wtf/issues/31#issuecomment-690749144, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALC2DJN7SMNNH5PKHYBXDSFFCLLANCNFSM4Q7HAAHQ.