Skip to content

Commit 6a8a491

Browse files
authored
Merge pull request #1756 from elementary-data/ele-3826-fix-teams-webhook-alerts
Response object has no attribute body, replaced with text
2 parents c1f9167 + d70f9e2 commit 6a8a491

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

elementary/clients/slack/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ def send_message(self, message: SlackMessageSchema, **kwargs) -> bool:
243243

244244
else:
245245
logger.error(
246-
f"Could not post message to slack via webhook - {self.webhook}. Error: {response.body}"
246+
f"Could not post message to slack via webhook - {self.webhook}. Error: {response.text}"
247247
)
248248
return False
249249

elementary/clients/teams/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def send_message(self, **kwargs) -> bool:
7575
logger.error(
7676
"Could not post message to teams via webhook - %s. Error: %s",
7777
{self.webhook},
78-
{response.body},
78+
{response.text},
7979
)
8080
return False
8181

0 commit comments

Comments
 (0)