mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
logging: Use logging.exception and exc_info for unexpected exceptions.
logging.exception() and logging.debug(exc_info=True), etc. automatically include a traceback. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
4b6d2cf25f
commit
1ed2d9b4a0
@@ -408,12 +408,11 @@ def process_message(message: EmailMessage, rcpt_to: Optional[str]=None) -> None:
|
||||
process_missed_message(to, message)
|
||||
else:
|
||||
process_stream_message(to, message)
|
||||
except ZulipEmailForwardUserError as e:
|
||||
# TODO: notify sender of error, retry if appropriate.
|
||||
logging.warning(e.args[0])
|
||||
except ZulipEmailForwardError as e:
|
||||
if isinstance(e, ZulipEmailForwardUserError):
|
||||
# TODO: notify sender of error, retry if appropriate.
|
||||
logging.warning(str(e))
|
||||
else:
|
||||
log_and_report(message, str(e), to)
|
||||
log_and_report(message, e.args[0], to)
|
||||
|
||||
def validate_to_address(rcpt_to: str) -> None:
|
||||
if is_missed_message_address(rcpt_to):
|
||||
|
||||
Reference in New Issue
Block a user