From c894292d323d490f9ffcaf7aacb81cecb8335e4b Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Fri, 7 Mar 2025 21:47:36 +0100 Subject: [PATCH] UX: add small error popup --- src/UI/InspectorGUI.svelte | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/UI/InspectorGUI.svelte b/src/UI/InspectorGUI.svelte index c07d65c8ef..182c1f3cfc 100644 --- a/src/UI/InspectorGUI.svelte +++ b/src/UI/InspectorGUI.svelte @@ -72,6 +72,15 @@ > = UIEventSource.asObject(osmConnection.getPreference("spied-upon-users"), []) async function load() { + try { + await loadUnsafe() + } catch (e) { + loadingData = false + alert("Loading failed") + } + } + + async function loadUnsafe() { const user = username.data if (user.indexOf(";") < 0) { const inspectedData = inspectedContributors.data