aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--slack/slack_conversation.py4
-rw-r--r--slack/slack_user.py2
-rw-r--r--slack/slack_workspace.py2
3 files changed, 4 insertions, 4 deletions
diff --git a/slack/slack_conversation.py b/slack/slack_conversation.py
index 49b7a2a..ebfc859 100644
--- a/slack/slack_conversation.py
+++ b/slack/slack_conversation.py
@@ -61,7 +61,7 @@ class SlackConversation:
info = await self.api.fetch_conversations_info(self)
if info["ok"] is False:
# TODO: Handle error
- return
+ raise Exception("Failed fetching conversation info")
info_channel = info["channel"]
if info_channel["is_im"] is True:
@@ -86,7 +86,7 @@ class SlackConversation:
history = await self.api.fetch_conversations_history(self)
if history["ok"] is False:
# TODO: Handle error
- return
+ raise Exception("Failed fetching conversation history")
start = time.time()
messages = [SlackMessage(self, message) for message in history["messages"]]
diff --git a/slack/slack_user.py b/slack/slack_user.py
index 6cb3897..4386657 100644
--- a/slack/slack_user.py
+++ b/slack/slack_user.py
@@ -20,5 +20,5 @@ class SlackUser:
info = await self.api.fetch_users_info(self)
if info["ok"] is False:
# TODO: Handle error
- return
+ raise Exception("Failed fetching user info")
self.name = info["user"]["name"]
diff --git a/slack/slack_workspace.py b/slack/slack_workspace.py
index e659eba..c5296c0 100644
--- a/slack/slack_workspace.py
+++ b/slack/slack_workspace.py
@@ -44,7 +44,7 @@ class SlackWorkspace:
)
if user_channels_response["ok"] is False:
# TODO: Handle error
- return
+ raise Exception("Failed fetching conversations")
user_channels = user_channels_response["channels"]