From fa1dbdbe51fdd678376fd5c3b7476a51ee87469f Mon Sep 17 00:00:00 2001 From: julian Date: Sat, 1 Jul 2023 13:49:10 -0600 Subject: [PATCH] extra logging and exit properly instead of rethrowing what is isn't really a true exception but rather an expected result if not transactions are found. Thanks API designers --- lib/services/ethereum/ethereum_token_service.dart | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/services/ethereum/ethereum_token_service.dart b/lib/services/ethereum/ethereum_token_service.dart index ebe55c73e..a42867485 100644 --- a/lib/services/ethereum/ethereum_token_service.dart +++ b/lib/services/ethereum/ethereum_token_service.dart @@ -449,6 +449,15 @@ class EthTokenWallet extends ChangeNotifier with EthTokenCache { ); if (response.value == null) { + if (response.exception != null && + response.exception!.message + .contains("response is empty but status code is 200")) { + Logging.instance.log( + "No ${tokenContract.name} transfers found for $addressString", + level: LogLevel.Info, + ); + return; + } throw response.exception ?? Exception("Failed to fetch token transaction data"); }