Improve connectivity-issue error message

zio/stable
Paul Frazee 2022-11-15 12:54:04 -06:00
parent 4ae6fbd3c8
commit b6705fbbaa
1 changed files with 3 additions and 0 deletions

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)
}