aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorAidan Epstein <aidan@jmad.org>2019-11-27 17:23:31 -0800
committerAidan Epstein <aidan@jmad.org>2020-02-18 14:48:34 -0800
commitfd241cdf2200844d6995c62000571e3a3de7e159 (patch)
tree3eae48a3b491de3173c5031b1b7e242099fb7cfe /wee_slack.py
parent4ffb44d01da6bc56f3f7a46de6cb7ed0f0f22a05 (diff)
downloadwee-slack-fd241cdf2200844d6995c62000571e3a3de7e159.tar.gz
Log errors to a proper debug location.
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/wee_slack.py b/wee_slack.py
index c6d42ae..92dfdae 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -3390,9 +3390,9 @@ def unfurl_blocks(message_json):
elif block["type"] == "context":
block_text.append("|".join(i["text"] for i in block["elements"]))
else:
- block_text.append(json.dumps(block))
+ raise NotImplementedError("Block type not implemented", block["type"])
except Exception as e:
- block_text.append(json.dumps(block) + repr(e))
+ dbg("Failed to unfurl block ({}): {}".format(repr(e), json.dumps(block)), level=4)
return "\n".join(block_text)