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:
parent
d6549623af
commit
db1aecd3d8
@ -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 () => {
|
||||||
|
try {
|
||||||
const info = await congratsInfo({});
|
const info = await congratsInfo({});
|
||||||
page.$set({ info });
|
page.$set({ info });
|
||||||
|
} catch {
|
||||||
|
console.log("congrats fetch failed");
|
||||||
|
}
|
||||||
}, 60000);
|
}, 60000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user