Ignore congrats fetch errors

The congrats page fetches data once a minute, and onRefreshTimer()
reloads the page once every 10 minutes. If a data fetch is in flight
when the page reload happens, it can cause a 'failed to fetch' error
to occur.

Closes #2895
This commit is contained in:
Damien Elmes 2024-01-19 15:28:54 +10:00
parent d6549623af
commit db1aecd3d8

View File

@ -26,8 +26,12 @@ export async function setupCongrats(): Promise<CongratsPage> {
// refresh automatically if a custom area not provided // refresh automatically if a custom area not provided
if (!customMountPoint) { if (!customMountPoint) {
setInterval(async () => { setInterval(async () => {
const info = await congratsInfo({}); try {
page.$set({ info }); const info = await congratsInfo({});
page.$set({ info });
} catch {
console.log("congrats fetch failed");
}
}, 60000); }, 60000);
} }