From 82a16f13056f7f29cc58ff70833172c6849c8edd Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Tue, 7 Oct 2025 07:46:13 -0500 Subject: [PATCH] refac: oauth client fallback --- backend/open_webui/main.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/backend/open_webui/main.py b/backend/open_webui/main.py index 6b1d8e5d82..d8893ce805 100644 --- a/backend/open_webui/main.py +++ b/backend/open_webui/main.py @@ -1933,10 +1933,17 @@ if len(app.state.config.TOOL_SERVER_CONNECTIONS) > 0: "oauth_client_info", "" ) - oauth_client_info = decrypt_data(oauth_client_info) - app.state.oauth_client_manager.add_client( - f"mcp:{server_id}", OAuthClientInformationFull(**oauth_client_info) - ) + try: + oauth_client_info = decrypt_data(oauth_client_info) + app.state.oauth_client_manager.add_client( + f"mcp:{server_id}", + OAuthClientInformationFull(**oauth_client_info), + ) + except Exception as e: + log.error( + f"Error adding OAuth client for MCP tool server {server_id}: {e}" + ) + pass try: if REDIS_URL: