diff --git a/app/lib/backend/http/http_pool_manager.dart b/app/lib/backend/http/http_pool_manager.dart index b4327b216e..ee65b25a16 100644 --- a/app/lib/backend/http/http_pool_manager.dart +++ b/app/lib/backend/http/http_pool_manager.dart @@ -70,6 +70,8 @@ class HttpPoolManager { lastError = TimeoutException('Request timeout'); } on SocketException catch (e) { lastError = e; + } on http.ClientException catch (e) { + lastError = e; } catch (e) { lastError = e; rethrow; @@ -81,7 +83,7 @@ class HttpPoolManager { } if (lastResponse != null) return lastResponse; - throw lastError!; + throw lastError ?? Exception('Request failed with unknown error'); } Future sendStreaming(http.BaseRequest request) {