make the error more readable when node fails to respond (#1570)
Some checks are pending
Cache Dependencies / test (push) Waiting to run

This commit is contained in:
cyan 2024-08-06 13:01:38 +02:00 committed by GitHub
parent a2549b42b0
commit 9da9bee384
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -110,7 +110,10 @@ Future<PendingTransactionDescription> createTransactionSync(
})(); })();
if (error != null) { if (error != null) {
final message = error; String message = error;
if (message.contains("RPC error")) {
message = "Invalid node response, please try again or switch node\n\ntrace: $message";
}
throw CreationTransactionException(message: message); throw CreationTransactionException(message: message);
} }