fix: improve error handling for network connection launch failures

This commit is contained in:
HorizonCode committed 2026-01-04 20:20:19 +01:00
1 parent 623559cf8e
commit f9b38ec9eb
1 file changed
+13 -2
+13 -2
View File
@@ -521,14 +521,25 @@
launching.set(false); launching.set(false);
} catch (err) { } catch (err) {
launchError = err as Error; const error = err as Error;
console.log(err); if (error.name === 'AbortError') {
toast.error('Hmmm...', {
description: 'Failed to launch.',
});
launching.set(false);
launchError = {
name: error.name,
message: 'Network request connection timed out.',
};
} else {
launchError = error;
toast.error('Hmmm...', { toast.error('Hmmm...', {
description: 'Failed to launch.', description: 'Failed to launch.',
}); });
launching.set(false); launching.set(false);
if ($trackingEnabled) umami.track('app_launch_fail', { error: err }); if ($trackingEnabled) umami.track('app_launch_fail', { error: err });
} }
}
}; };
onMount(() => { onMount(() => {