From d70f9e2901d783386d7baa4083066aedc3da2931 Mon Sep 17 00:00:00 2001 From: MikaKerman Date: Tue, 19 Nov 2024 13:59:44 +0200 Subject: [PATCH] Response object has no attribute body, replaced with text --- elementary/clients/slack/client.py | 2 +- elementary/clients/teams/client.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/elementary/clients/slack/client.py b/elementary/clients/slack/client.py index f05eef228..9fd1ef4a0 100644 --- a/elementary/clients/slack/client.py +++ b/elementary/clients/slack/client.py @@ -243,7 +243,7 @@ def send_message(self, message: SlackMessageSchema, **kwargs) -> bool: else: logger.error( - f"Could not post message to slack via webhook - {self.webhook}. Error: {response.body}" + f"Could not post message to slack via webhook - {self.webhook}. Error: {response.text}" ) return False diff --git a/elementary/clients/teams/client.py b/elementary/clients/teams/client.py index c5a692d61..2e4d8cd0b 100644 --- a/elementary/clients/teams/client.py +++ b/elementary/clients/teams/client.py @@ -75,7 +75,7 @@ def send_message(self, **kwargs) -> bool: logger.error( "Could not post message to teams via webhook - %s. Error: %s", {self.webhook}, - {response.body}, + {response.text}, ) return False