aboutsummaryrefslogtreecommitdiffstats
path: root/slack/slack_workspace.py
diff options
context:
space:
mode:
Diffstat (limited to 'slack/slack_workspace.py')
-rw-r--r--slack/slack_workspace.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/slack/slack_workspace.py b/slack/slack_workspace.py
index 0fab5b2..8c0f9a6 100644
--- a/slack/slack_workspace.py
+++ b/slack/slack_workspace.py
@@ -85,7 +85,10 @@ class SlackItem(
) -> SlackItemClass:
if items_info_task:
items_info = await items_info_task
- return self._create_item_from_info(items_info[item_id])
+ item = items_info.get(item_id)
+ if item is None:
+ raise SlackError(self.workspace, "item_not_found")
+ return self._create_item_from_info(item)
else:
return await self._item_class.create(self.workspace, item_id)