helium / network-explorer

https://explorer.helium.com
Apache License 2.0
51 stars 29 forks source link

Stats error debug #72

Closed mbthiery closed 1 year ago

mbthiery commented 1 year ago

The stats page occasionally errors. This PR adds logic to:

This should reduce the occurrence of the stats page erroring, however there may simply still be a bug in the nextjs code itself with regards to prefetching. I noticed this error also occurs on the nextjs docs website itself. From my understanding this happens because if you open a page it'll prefetch any links, if you wait a while (maybe 20-30 minutes) before clicking on the links, the pre-fetched data stream the browser has is now stale and will error when it tries to use it. If my understanding is correct, the above mentioned changes should not have any effect on this bug. However if you simply reload the page and then follow the link (or alternatively add the link directly to your url) the page loads.