Improve connectivity-issue error message
This commit is contained in:
parent
4ae6fbd3c8
commit
b6705fbbaa
1 changed files with 3 additions and 0 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue