2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-04-28 05:26:47 +00:00

Handle OSError when attempting connection (#339)

This commit is contained in:
Oliver 2023-04-21 21:24:14 +10:00 committed by GitHub
parent bb781aaed5
commit 2c5ceeabdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1078,6 +1078,10 @@ class InvenTreeAPI {
debug("TimeoutException at ${url}");
showTimeoutError(url);
return null;
} on OSError catch (error) {
debug("OSError at ${url}: ${error.toString()}");
showServerError(url, L10().connectionRefused, error.toString());
return null;
} on CertificateException catch (error) {
debug("CertificateException at ${url}:");
debug(error.toString());