Skip to content

Commit

Permalink
[INTPROD-8885] Provide WARNING for missing tokens (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
colinsl authored Sep 5, 2023
1 parent 734861f commit b4900d1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions omnibot/services/slack/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,15 @@ def client(bot, client_type="bot"):
try:
return _client[team_name][bot.name]["bot"]
except KeyError:
pass
logger.warning(
"slack_oauth_bot_token is missing",
extra=bot.logging_context,
)
elif client_type == "user":
return _client[team_name][bot.name]["user"]
try:
return _client[team_name][bot.name]["user"]
except KeyError:
logger.warning("slack_oauth_token is missing", extra=bot.logging_context)


def _get_failure_context(result):
Expand Down

0 comments on commit b4900d1

Please sign in to comment.