From 224cffde8dcb14b194310583a3093e3b3be2705f Mon Sep 17 00:00:00 2001 From: Goffi Date: Sat, 15 Oct 2022 20:38:33 +0200 Subject: [PATCH] plugin XEP-0384: continue workflow and log error in case of issue in self.__prepare_for_profile: an exception while preparing profile should not stop the message to be propagated --- sat/plugins/plugin_xep_0384.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sat/plugins/plugin_xep_0384.py b/sat/plugins/plugin_xep_0384.py index 8ad03c91..e3c6c781 100644 --- a/sat/plugins/plugin_xep_0384.py +++ b/sat/plugins/plugin_xep_0384.py @@ -1591,7 +1591,12 @@ class OMEMO: None )) - session_manager = await self.__prepare_for_profile(cast(str, client.profile)) + try: + session_manager = await self.__prepare_for_profile(cast(str, client.profile)) + except Exception as e: + log.error(f"error while preparing profile for {client.profile}: {e}") + # we don't want to block the workflow + return True if twomemo_encrypted_elt is not None: try: