mirror of
https://framagit.org/framasoft/framaspace/argos.git
synced 2025-04-28 18:02:41 +02:00
Log errors that occured on the client side
This commit is contained in:
parent
f038a37022
commit
835ee50c1f
2 changed files with 2 additions and 1 deletions
|
@ -62,7 +62,7 @@ class HTTPBodyContains(BaseCheck):
|
||||||
async def run(self) -> dict:
|
async def run(self) -> dict:
|
||||||
response = await self.client.request(method="get", url=self.task.url)
|
response = await self.client.request(method="get", url=self.task.url)
|
||||||
return self.response(
|
return self.response(
|
||||||
self.expected in response.body
|
self.expected in response.text
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ async def complete_task(client: httpx.AsyncClient, task: dict) -> dict:
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
status = "error"
|
status = "error"
|
||||||
context = SerializableException.from_exception(e)
|
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)
|
return ClientResult(task=task.id, status=status, context=context)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue