From 74b6bf4a8117b446907e45a88fe2e7f06ece29db Mon Sep 17 00:00:00 2001 From: Trygve Aaberge Date: Fri, 25 Aug 2023 17:28:21 +0200 Subject: Support rendering files --- slack/commands.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'slack/commands.py') diff --git a/slack/commands.py b/slack/commands.py index b1ac545..69183a2 100644 --- a/slack/commands.py +++ b/slack/commands.py @@ -9,7 +9,7 @@ from typing import Callable, Dict, List, Optional, Tuple import weechat -from slack.error import SlackRtmError, UncaughtError +from slack.error import SlackError, SlackRtmError, UncaughtError from slack.log import print_error from slack.python_compatibility import format_exception, removeprefix, removesuffix from slack.shared import shared @@ -283,6 +283,8 @@ def print_uncaught_error( if data: if isinstance(error.exception, SlackRtmError): weechat.prnt("", f" data: {json.dumps(error.exception.message_json)}") + elif isinstance(error.exception, SlackError): + weechat.prnt("", f" data: {json.dumps(error.exception.data)}") else: print_error("This error does not have any data") -- cgit