Modified exception handling for notification item publishing to handle any exception
This commit is contained in:
@@ -38,11 +38,11 @@ class Hook(hook.BaseHook):
|
|||||||
encoding=self._encoding
|
encoding=self._encoding
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
except ChannelWrongStateError as e:
|
except Exception as e:
|
||||||
if recall:
|
if isinstance(e, ChannelWrongStateError) and recall:
|
||||||
self._make_connection_synced()
|
self._make_connection_synced()
|
||||||
self._notify(notification_item, False)
|
self._notify(notification_item, False)
|
||||||
return
|
return
|
||||||
logger.error("An exception is occurred while "
|
logger.error("An exception occurred during "
|
||||||
"publishing hook notification item: %s",
|
"publishing hook notification item: %s",
|
||||||
e, exc_info=True)
|
e, exc_info=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user