handle connection errors more clearly

This commit is contained in:
Paul Miller
2023-08-16 11:28:40 -05:00
parent a6d5589999
commit b50883b05b
2 changed files with 34 additions and 1 deletions

View File

@@ -33,6 +33,37 @@ export default function SetupErrorDisplay(props: { initialError: Error }) {
return ( return (
<SafeArea> <SafeArea>
<Switch> <Switch>
<Match
when={error.message.startsWith("Network connection closed")}
>
<DefaultMain>
<LargeHeader>
{i18n.t("error.on_boot.loading_failed.header")}
</LargeHeader>
<p class="bg-white/10 rounded-xl p-4 font-mono">
<span class="font-bold">{error.name}</span>:{" "}
{error.message}
</p>
<NiceP>
{i18n.t(
"error.on_boot.loading_failed.services_down"
)}
</NiceP>
<NiceP>
Follow us on{" "}
<ExternalLink href="https://primal.net/p/npub1mutnyacc9uc4t5mmxvpprwsauj5p2qxq95v4a9j0jxl8wnkfvuyque23vg">
Nostr
</ExternalLink>{" "}
or{" "}
<ExternalLink href="https://twitter.com/MutinyWallet">
Twitter
</ExternalLink>{" "}
for updates.
</NiceP>
<ErrorFooter />
</DefaultMain>
</Match>
<Match when={error.message.startsWith("Existing tab")}> <Match when={error.message.startsWith("Existing tab")}>
<Title>{i18n.t("error.on_boot.existing_tab.title")}</Title> <Title>{i18n.t("error.on_boot.existing_tab.title")}</Title>
<DefaultMain> <DefaultMain>

View File

@@ -477,7 +477,9 @@ export default {
"If your wallet seems broken, here are some tools to try to debug and repair it.", "If your wallet seems broken, here are some tools to try to debug and repair it.",
questions: questions:
"If you have any questions on what these buttons do, please", "If you have any questions on what these buttons do, please",
support_link: "reach out to us for support." support_link: "reach out to us for support.",
services_down:
"It looks like one of Mutiny's services is down. Please try again later."
} }
} }
}, },