Skip to content

Commit

Permalink
core/chains/evm/client/errors.go: wrap log msgs with Sprintf (#12168)
Browse files Browse the repository at this point in the history
  • Loading branch information
friedemannf authored Feb 26, 2024
1 parent 731499a commit 05b5612
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/chains/evm/client/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ func ClassifySendError(err error, lggr logger.SugaredLogger, tx *types.Transacti
return commonclient.Fatal
}
if sendError.IsNonceTooLowError() || sendError.IsTransactionAlreadyMined() {
lggr.Debugw("Transaction already confirmed for this nonce: %d", tx.Nonce(), "err", sendError, "etx", tx)
lggr.Debugw(fmt.Sprintf("Transaction already confirmed for this nonce: %d", tx.Nonce()), "err", sendError, "etx", tx)
// Nonce too low indicated that a transaction at this nonce was confirmed already.
// Mark it as TransactionAlreadyKnown.
return commonclient.TransactionAlreadyKnown
Expand Down Expand Up @@ -491,15 +491,15 @@ func ClassifySendError(err error, lggr logger.SugaredLogger, tx *types.Transacti
return commonclient.InsufficientFunds
}
if sendError.IsServiceUnavailable() {
lggr.Errorw("service unavailable while sending transaction %x", tx.Hash(), "err", sendError, "etx", tx)
lggr.Errorw(fmt.Sprintf("service unavailable while sending transaction %x", tx.Hash()), "err", sendError, "etx", tx)
return commonclient.Retryable
}
if sendError.IsTimeout() {
lggr.Errorw("timeout while sending transaction %x", tx.Hash(), "err", sendError, "etx", tx)
lggr.Errorw(fmt.Sprintf("timeout while sending transaction %x", tx.Hash()), "err", sendError, "etx", tx)
return commonclient.Retryable
}
if sendError.IsCanceled() {
lggr.Errorw("context was canceled while sending transaction %x", tx.Hash(), "err", sendError, "etx", tx)
lggr.Errorw(fmt.Sprintf("context was canceled while sending transaction %x", tx.Hash()), "err", sendError, "etx", tx)
return commonclient.Retryable
}
if sendError.IsTxFeeExceedsCap() {
Expand Down

0 comments on commit 05b5612

Please sign in to comment.