From 1b2ca9512f59fa03c8248c3cc8122e7a58e06f3c Mon Sep 17 00:00:00 2001 From: patrick-motsch Date: Mon, 16 Feb 2026 23:45:47 +0100 Subject: [PATCH] debug: add logging to test-auth credential loading Co-authored-by: Cursor --- modules/features/teamsbot/routeFeatureTeamsbot.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/modules/features/teamsbot/routeFeatureTeamsbot.py b/modules/features/teamsbot/routeFeatureTeamsbot.py index 984539f5..1d0a5cb8 100644 --- a/modules/features/teamsbot/routeFeatureTeamsbot.py +++ b/modules/features/teamsbot/routeFeatureTeamsbot.py @@ -735,9 +735,16 @@ async def testAuth( if systemBot: email = systemBot.get("email") encryptedPwd = systemBot.get("encryptedPassword") + logger.info(f"[test-auth] System bot found: email={email}, hasEncryptedPwd={bool(encryptedPwd)}") if encryptedPwd: - from modules.shared.configuration import decryptValue - password = decryptValue(encryptedPwd, userId=str(context.user.id), keyName="systemBotPassword") + try: + from modules.shared.configuration import decryptValue + password = decryptValue(encryptedPwd, userId=str(context.user.id), keyName="systemBotPassword") + logger.info(f"[test-auth] Password decrypted successfully, length={len(password) if password else 0}") + except Exception as e: + logger.error(f"[test-auth] Password decryption failed: {e}") + else: + logger.warn(f"[test-auth] No active system bot found for mandate {mandateId}") # Forward to browser bot service browserBotUrl = effectiveConfig._getEffectiveBrowserBotUrl()