mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 03:49:22 +00:00
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
This commit is contained in:
parent
bd5a0c1631
commit
fa1dbdbe51
1 changed files with 9 additions and 0 deletions
|
@ -449,6 +449,15 @@ class EthTokenWallet extends ChangeNotifier with EthTokenCache {
|
||||||
);
|
);
|
||||||
|
|
||||||
if (response.value == null) {
|
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 ??
|
throw response.exception ??
|
||||||
Exception("Failed to fetch token transaction data");
|
Exception("Failed to fetch token transaction data");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue