diff --git a/src/handlers/email_signal_extraction.py b/src/handlers/email_signal_extraction.py index e67f073..0168736 100644 --- a/src/handlers/email_signal_extraction.py +++ b/src/handlers/email_signal_extraction.py @@ -89,12 +89,10 @@ def on_email_received(self, el, msgs): email_content = json.loads(email_content) email_content = json.dumps(email_content) log.info(f"Sending webhook alert<{email_subject}>, content: {email_content}") - try: - broadcast(email_content) - log.info(f"The whole process taken {round((datetime.now(timezone.utc) - email_date).total_seconds(), 3)}s.") - self.add_email_to_history(email_uid) - except Exception as err: - log.error(f"Sent webhook failed, reason: {err}") + + broadcast(email_content) + log.info(f"The whole process taken {round((datetime.now(timezone.utc) - email_date).total_seconds(), 3)}s.") + self.add_email_to_history(email_uid) def start(self): if self.imap_auto_reconnect_wait <= 0: diff --git a/src/handlers/ngrok_signal_redirect.py b/src/handlers/ngrok_signal_redirect.py index b0b8879..4cd1171 100644 --- a/src/handlers/ngrok_signal_redirect.py +++ b/src/handlers/ngrok_signal_redirect.py @@ -38,11 +38,8 @@ def on_data_received(self, data: dict): return log.info(f"Sending webhook alert<{email_subject}>, content: {email_content}") - try: - broadcast(email_content) - log.info(f"The whole process taken {self.calculate_seconds_to_now(receive_datetime)}s.") - except Exception as err: - log.error(f"Sent webhook failed, reason: {err}") + broadcast(email_content) + log.info(f"The whole process taken {self.calculate_seconds_to_now(receive_datetime)}s.") def setup_ngrok(self, port: int): try_import("pyngrok")