From 6e30572e6dd50abe3db1791d6c45b8ac099e2c2b Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 10 Mar 2020 09:43:48 +1000 Subject: [PATCH] log sync errors --- rslib/src/media/sync.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rslib/src/media/sync.rs b/rslib/src/media/sync.rs index 837665f6c..5bf7dbcc6 100644 --- a/rslib/src/media/sync.rs +++ b/rslib/src/media/sync.rs @@ -165,8 +165,15 @@ where self.skey.as_ref().unwrap() } - #[allow(clippy::useless_let_if_seq)] pub async fn sync(&mut self, hkey: &str) -> Result<()> { + self.sync_inner(hkey).await.map_err(|e| { + debug!(self.log, "sync error: {:?}", e); + e + }) + } + + #[allow(clippy::useless_let_if_seq)] + async fn sync_inner(&mut self, hkey: &str) -> Result<()> { self.register_changes()?; let meta = self.ctx.get_meta()?;