From 835ee50c1f21ac812b28669dd8a2c9eae80e4e76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20M=C3=A9taireau?= Date: Thu, 5 Oct 2023 11:10:39 +0200 Subject: [PATCH] Log errors that occured on the client side --- argos/checks/__init__.py | 2 +- argos/client/cli.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/argos/checks/__init__.py b/argos/checks/__init__.py index 304aaa7..93eb551 100644 --- a/argos/checks/__init__.py +++ b/argos/checks/__init__.py @@ -62,7 +62,7 @@ class HTTPBodyContains(BaseCheck): async def run(self) -> dict: response = await self.client.request(method="get", url=self.task.url) return self.response( - self.expected in response.body + self.expected in response.text ) diff --git a/argos/client/cli.py b/argos/client/cli.py index cca7d2f..06d2bac 100644 --- a/argos/client/cli.py +++ b/argos/client/cli.py @@ -21,6 +21,7 @@ async def complete_task(client: httpx.AsyncClient, task: dict) -> dict: except Exception as e: status = "error" context = SerializableException.from_exception(e) + logger.error(f"An exception occured when trying to complete {task} : {e}") return ClientResult(task=task.id, status=status, context=context)