From d5508bdd36dfcafd0b1e66fdabbb10f572bdeb5d Mon Sep 17 00:00:00 2001 From: gabaldon Date: Mon, 18 Nov 2024 16:55:09 +0100 Subject: [PATCH] fix: throw socket exception message --- lib/src/network/explorer/explorer_client.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/src/network/explorer/explorer_client.dart b/lib/src/network/explorer/explorer_client.dart index eaafeb7..2323711 100644 --- a/lib/src/network/explorer/explorer_client.dart +++ b/lib/src/network/explorer/explorer_client.dart @@ -65,7 +65,11 @@ class RetryHttpClient { } on http.ClientException catch (e) { if (e.message.contains('Client is already closed')) { retryClient = RetryClient(http.Client()); - response = await requestMethod(uri, body: data); + throw HttpException(e.toString()); + } + if (e.toString().contains('SocketException')) { + retryClient = RetryClient(http.Client()); + throw HttpException(e.toString()); } } if (response != null) {