about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2022-11-15 12:54:04 -0600
committerPaul Frazee <pfrazee@gmail.com>2022-11-15 12:54:04 -0600
commitb6705fbbaa79efdeee444b65e1a9af1ed89ae25f (patch)
tree00b1d7cf5932d02c805bf0d50d33e3fcebfe04d4
parent4ae6fbd3c8e8be9d47d0bd959aeac380f7bf67ce (diff)
downloadvoidsky-b6705fbbaa79efdeee444b65e1a9af1ed89ae25f.tar.zst
Improve connectivity-issue error message
-rw-r--r--src/view/lib/strings.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/view/lib/strings.ts b/src/view/lib/strings.ts
index e47863d50..214bb51d6 100644
--- a/src/view/lib/strings.ts
+++ b/src/view/lib/strings.ts
@@ -98,6 +98,9 @@ export function enforceLen(str: string, len: number): string {
 }
 
 export function cleanError(str: string): string {
+  if (str.includes('Network request failed')) {
+    return 'Unable to connect. Please check your internet connection and try again.'
+  }
   if (str.startsWith('Error: ')) {
     return str.slice('Error: '.length)
   }