frontend: better english for network error

Massimo Melina committed Apr 9, 2022 at 12:16 UTC 9a4e78ebcaeb64fcccaec9345ad97b8c9258c967
1 file changed +2
frontend/src/api.ts
+2
@@ -22,6 +22,8 @@ export function apiCall(cmd: string, params?: Dict, options: ApiCallOptions={})
22 throw new ApiError(res.status, msg)
23 }, err => {
24 stop?.()
25 + if (err?.message?.includes('fetch'))
26 + throw "Network error"
27 throw err
28 })
29 }