Skip to content

Commit 20538da

Browse files
committed
safely add reaction
1 parent 05b157e commit 20538da

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/slackBotFunction/app/utils/handler_utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,7 @@ def respond_with_eyes(bot_token, event):
6262
client = WebClient(token=bot_token)
6363
channel = event["channel"]
6464
ts = event["ts"]
65-
client.reactions_add(channel=channel, timestamp=ts, name="eyes")
65+
try:
66+
client.reactions_add(channel=channel, timestamp=ts, name="eyes")
67+
except Exception:
68+
logger.error("Failed to respond with eyes", extra={"error": traceback.format_exc()})

0 commit comments

Comments
 (0)