@@ -86,7 +86,6 @@ def get_issue_prefetches():
8686 ]
8787
8888
89-
9089def save_webhook_log (
9190 webhook : Webhook ,
9291 request_method : str ,
@@ -98,10 +97,9 @@ def save_webhook_log(
9897 retry_count : int ,
9998 event_type : str ,
10099) -> None :
101-
102100 # webhook_logs
103101 mongo_collection = MongoConnection .get_collection ("webhook_logs" )
104-
102+
105103 log_data = {
106104 "workspace_id" : str (webhook .workspace_id ),
107105 "webhook" : str (webhook .id ),
@@ -123,7 +121,7 @@ def save_webhook_log(
123121 logger .info ("Webhook log saved successfully to mongo" )
124122 mongo_save_success = True
125123 except Exception as e :
126- log_exception (e )
124+ log_exception (e , warning = True )
127125 logger .error (f"Failed to save webhook log: { e } " )
128126 mongo_save_success = False
129127
@@ -134,7 +132,7 @@ def save_webhook_log(
134132 WebhookLog .objects .create (** log_data )
135133 logger .info ("Webhook log saved successfully to database" )
136134 except Exception as e :
137- log_exception (e )
135+ log_exception (e , warning = True )
138136 logger .error (f"Failed to save webhook log: { e } " )
139137
140138
@@ -244,7 +242,7 @@ def send_webhook_deactivation_email(webhook_id: str, receiver_id: str, current_s
244242 msg .send ()
245243 logger .info ("Email sent successfully." )
246244 except Exception as e :
247- log_exception (e )
245+ log_exception (e , warning = True )
248246 logger .error (f"Failed to send email: { e } " )
249247
250248
0 commit comments