aboutsummaryrefslogtreecommitdiffstats
path: root/slack/task.py
diff options
context:
space:
mode:
Diffstat (limited to 'slack/task.py')
-rw-r--r--slack/task.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/slack/task.py b/slack/task.py
index 2f68181..763f605 100644
--- a/slack/task.py
+++ b/slack/task.py
@@ -20,7 +20,7 @@ from uuid import uuid4
import weechat
-from slack.error import HttpError, SlackApiError, format_exception
+from slack.error import HttpError, SlackApiError, SlackError, format_exception
from slack.log import print_error
from slack.shared import shared
from slack.util import get_callback_name
@@ -120,7 +120,11 @@ def task_runner(task: Task[Any], response: Any):
or not weechat_task_cb_in_stack
and create_task_in_stack == 1
):
- if isinstance(e, HttpError) or isinstance(e, SlackApiError):
+ if (
+ isinstance(e, HttpError)
+ or isinstance(e, SlackApiError)
+ or isinstance(e, SlackError)
+ ):
exception_str = format_exception(e)
print_error(f"{exception_str}, task: {task}")
else: