fix: Reduce sync error logs to info or warn

Network issues are very common.
This commit is contained in:
teor 2020-07-21 23:00:29 +10:00 committed by Henry de Valence
parent a0dbe85acd
commit e5bb96715f
1 changed files with 9 additions and 5 deletions

View File

@ -169,8 +169,8 @@ where
"added hashes to download set" "added hashes to download set"
); );
} }
Ok(r) => tracing::error!("unexpected response {:?}", r), Ok(r) => tracing::info!("unexpected response {:?}", r),
Err(e) => tracing::error!("{:?}", e), Err(e) => tracing::info!("{:?}", e),
} }
} }
@ -240,8 +240,8 @@ where
download_set.extend(hashes); download_set.extend(hashes);
} }
Ok(r) => tracing::error!("unexpected response {:?}", r), Ok(r) => tracing::info!("unexpected response {:?}", r),
Err(e) => tracing::error!("{:?}", e), Err(e) => tracing::info!("{:?}", e),
} }
} }
} }
@ -320,7 +320,11 @@ where
match result_fut.await { match result_fut.await {
Ok(()) => {} Ok(()) => {}
Err(e) => error!("{:?}", e), // Block validation errors are unexpected, they could
// be a bug in our code.
//
// TODO: log request errors at info level
Err(e) => warn!("{:?}", e),
} }
} }
.instrument(tracing::Span::current()), .instrument(tracing::Span::current()),