Skip to content

Commit 51c9b4d

Browse files
committed
Log HTTP 400 at TRACE instead of ignoring it
.. while it's most often bitcoind already knowing about a transaction already, the error sometimes holds additional information (e.g., not meeting the mempool min).
1 parent 60dffa8 commit 51c9b4d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/chain/mod.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -993,11 +993,16 @@ impl ChainSource {
993993
Err(e) => match e {
994994
esplora_client::Error::Reqwest(err) => {
995995
if err.status() == reqwest::StatusCode::from_u16(400).ok() {
996-
// Ignore 400, as this just means bitcoind already knows the
996+
// Log 400 at lesser level, as this often just means bitcoind already knows the
997997
// transaction.
998998
// FIXME: We can further differentiate here based on the error
999999
// message which will be available with rust-esplora-client 0.7 and
10001000
// later.
1001+
log_trace!(
1002+
logger,
1003+
"Failed to broadcast due to HTTP connection error: {}",
1004+
err
1005+
);
10011006
} else {
10021007
log_error!(
10031008
logger,

0 commit comments

Comments
 (0)