From 6ec8b8aa08b455f345857ba58a99ef4755e51d52 Mon Sep 17 00:00:00 2001 From: benoit74 Date: Mon, 18 Nov 2024 08:10:04 +0000 Subject: [PATCH] Log exception when recording IP changes fails --- .../backend/src/routes/requested_tasks/requested_task.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dispatcher/backend/src/routes/requested_tasks/requested_task.py b/dispatcher/backend/src/routes/requested_tasks/requested_task.py index 53941b22..be3f5ed8 100644 --- a/dispatcher/backend/src/routes/requested_tasks/requested_task.py +++ b/dispatcher/backend/src/routes/requested_tasks/requested_task.py @@ -248,10 +248,13 @@ def get(self, session: so.Session, token: AccessToken.Payload): if constants.USES_WORKERS_IPS_WHITELIST: try: record_ip_change(session=session, worker_name=worker_name) - except Exception: + except Exception as exc: + logger.exception( + "Pushing IP changes to Wasabi failed", exc_info=exc + ) raise HTTPBase( status_code=HTTPStatus.SERVICE_UNAVAILABLE, - error="Recording IP changes failed", + error="Pushing IP changes to Wasabi failed", ) request_args = WorkerRequestedTaskSchema().load(request_args)