feat: add debugging info for failed to fetch transaction

Add the jsonrpc error message and data to tracing calls to try debug #1061
"monero-wallet-rpc failed to fetch transaction"
pull/1088/head
Byron Hambly 2 years ago
parent b7e2e0805e
commit 7e4af68cba
No known key found for this signature in database
GPG Key ID: DE8F6EA20A661697

@ -314,8 +314,13 @@ async fn wait_for_confirmations<C: monero_rpc::wallet::MoneroWalletRpc<reqwest::
.await
{
Ok(proof) => proof,
Err(jsonrpc::Error::JsonRpc(jsonrpc::JsonRpcError { code: -1, .. })) => {
tracing::warn!(%txid, "`monero-wallet-rpc` failed to fetch transaction, may need to be restarted");
Err(jsonrpc::Error::JsonRpc(jsonrpc::JsonRpcError {
code: -1,
message,
data,
})) => {
tracing::debug!(message, ?data);
tracing::warn!(%txid, message, "`monero-wallet-rpc` failed to fetch transaction, may need to be restarted");
continue;
}
// TODO: Implement this using a generic proxy for each function call once https://github.com/thomaseizinger/rust-jsonrpc-client/issues/47 is fixed.

Loading…
Cancel
Save