From bc2e3707b2634537a472abfa65d7d9cf6e57f7e3 Mon Sep 17 00:00:00 2001 From: j1nxie Date: Sun, 17 Nov 2024 10:03:52 +0700 Subject: [PATCH] fix: the last inspect errors --- src/chapter_tracker.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/chapter_tracker.rs b/src/chapter_tracker.rs index 1ba1310..72a2d44 100644 --- a/src/chapter_tracker.rs +++ b/src/chapter_tracker.rs @@ -19,7 +19,10 @@ pub async fn chapter_tracker(http: &Http, webhook: &Webhook, data: &Data) -> Res .id(db_manga.manga_dex_id) .get() .send() - .await?; + .await + .inspect_err(|e| + tracing::error!(err = ?e, uuid = %db_manga.manga_dex_id, "an error occurred when fetching manga"), + )?; let manga_id = manga.data.id; let manga = manga.data.attributes; @@ -58,7 +61,10 @@ pub async fn chapter_tracker(http: &Http, webhook: &Webhook, data: &Data) -> Res .excluded_groups(MD_BLOCKED_LIST.clone()) .limit(1u32) .send() - .await?; + .await + .inspect_err(|e| + tracing::error!(err = ?e, uuid = %db_manga.manga_dex_id, "an error occurred when fetching chapter feed"), + )?; let mut db_manga_insert = db_manga.into_active_model(); let now = time::OffsetDateTime::now_utc();