Skip to content

Commit 5282876

Browse files
committed
warn when can not get friendly name
1 parent 0936265 commit 5282876

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/slackBotFunction/app/core/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616

1717
@lru_cache()
18-
def get_logger():
18+
def get_logger() -> Logger:
1919
return Logger(service="slackBotFunction")
2020

2121

packages/slackBotFunction/app/services/slack.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ def get_friendly_channel_name(channel_id: str, client: WebClient) -> str:
1414
if conversations_info_response["ok"]:
1515
friendly_channel_name = conversations_info_response["channel"]["name"]
1616
else:
17-
logger(
17+
logger.warning(
1818
"There was a problem getting the friendly channel name",
1919
extra={"conversations_info_response": conversations_info_response},
2020
)
2121
except Exception:
22-
logger.error("There was an error getting the friendly channel name", extra={"error": traceback.format_exc()})
22+
logger.warning("There was an error getting the friendly channel name", extra={"error": traceback.format_exc()})
2323
return friendly_channel_name

0 commit comments

Comments
 (0)