Add generic exception handling for Slack notification

This commit is contained in:
Petr Kalis 2022-03-24 11:53:57 +01:00
parent 0bfb3c3dfc
commit aaa4c1d54c

View file

@ -210,6 +210,9 @@ class IntegrateSlackAPI(pyblish.api.InstancePlugin):
# You will get a SlackApiError if "ok" is False
error_str = self._enrich_error(str(e.response["error"]), channel)
self.log.warning("Error happened {}".format(error_str))
except Exception as e:
error_str = self._enrich_error(str(e), channel)
self.log.warning("Not SlackAPI error: {}".format(error_str))
return None, []