From 1ee33093820a98f689fc5ddcb63e5f7716f2550e Mon Sep 17 00:00:00 2001 From: Jvst Me Date: Thu, 16 Jul 2026 09:55:56 +0200 Subject: [PATCH] Update gateway connection error log level Use `warning` instead of `error` to avoid reporting connection errors to Sentry. These errors can occur if the user deleted or stopped the gateway directly in the backend, in which case the error does not indicate a problem with `dstack`. --- .../_internal/server/background/scheduled_tasks/gateways.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dstack/_internal/server/background/scheduled_tasks/gateways.py b/src/dstack/_internal/server/background/scheduled_tasks/gateways.py index 97dcb8164..73d153730 100644 --- a/src/dstack/_internal/server/background/scheduled_tasks/gateways.py +++ b/src/dstack/_internal/server/background/scheduled_tasks/gateways.py @@ -57,7 +57,7 @@ async def _process_connection(conn: GatewayConnection): try: await conn.check_or_restart() except SSHError as e: - logger.error("Connection to gateway %s failed: %s", conn.ip_address, e) + logger.warning("Connection to gateway %s failed: %s", conn.ip_address, e) return await conn.try_collect_stats()