Improve connectivity-issue error message

This commit is contained in:
Paul Frazee
2022-11-15 12:54:04 -06:00
parent aadec58087
commit 194c6dc0fd
+3
View File
@@ -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)
}