From 2cbcc51c334dd820f1fc11a0a52533ad1d05e9ca Mon Sep 17 00:00:00 2001 From: farkadi Date: Tue, 14 Jan 2025 00:05:55 +0700 Subject: [PATCH] Update --- src/api/auth_api.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/api/auth_api.py b/src/api/auth_api.py index 82146af..fd2ba8c 100644 --- a/src/api/auth_api.py +++ b/src/api/auth_api.py @@ -94,6 +94,12 @@ class AuthAPI: gmlevel=0 ) + except ConnectionRefusedError: + raise # Пробрасываем ошибку выше для обработки в диалоге + except aiomysql.OperationalError as e: + if e.args[0] == 2003: # Can't connect to MySQL server + raise ConnectionRefusedError("Сервер базы данных недоступен") + raise except Exception as e: print(f"Error during login: {e}") return AuthResult(