Browse Source

feat: only log error if there is one deleting webhooks

thesimplekid 8 tháng trước cách đây
mục cha
commit
6de00fdb9f
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      crates/cdk-strike/src/lib.rs

+ 4 - 1
crates/cdk-strike/src/lib.rs

@@ -226,7 +226,10 @@ impl Strike {
         tracing::debug!("Got {} current subscriptions", subs.len());
 
         for sub in subs {
-            self.strike_api.delete_subscription(sub.id).await?;
+            tracing::info!("Deleting webhook: {}", &sub.id);
+            if let Err(err) = self.strike_api.delete_subscription(&sub.id).await {
+                tracing::error!("Error deleting webhook subscription: {} {}", sub.id, err);
+            }
         }
 
         self.strike_api