Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/core/slack.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ async def request_upload_via_dm(user_id: str, announcement_text: str) -> None:
await client.chat_postMessage(
channel=user_id, text=SLACK_JUMPSTART_MESSAGE, blocks=message
)
except SlackApiError as e:
logger.error(f"Slack Error: {e.response['error']}\n")
logger.error(f"Full Slack Error: {e.response}")
except Exception as e:
logger.error(f"Error messaging user {user_id}: {e}")

Expand Down
8 changes: 2 additions & 6 deletions tests/src/core/test_slack.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,8 @@ def test_request_upload_via_dm_success_and_exception(monkeypatch):

class FakeClient:
async def conversations_open(self, *, users):
return {
"ok": True,
"channel": {
"id": "FAKE_CHANNEL"
}
}
return {"ok": True, "channel": {"id": "FAKE_CHANNEL"}}

async def chat_postMessage(self, *, channel, text, blocks):
recorded["channel"] = channel
recorded["text"] = text
Expand Down
Loading