diff --git a/backend/open_webui/main.py b/backend/open_webui/main.py index 4c27e811cb..202bd32c1d 100644 --- a/backend/open_webui/main.py +++ b/backend/open_webui/main.py @@ -1864,7 +1864,7 @@ async def chat_completion( "model": model_id, }, ) - except: + except Exception: pass ctx = build_chat_response_context( @@ -1911,7 +1911,7 @@ async def chat_completion( {"type": "chat:tasks:cancel"}, ) - except: + except Exception: pass finally: try: diff --git a/backend/open_webui/utils/oauth.py b/backend/open_webui/utils/oauth.py index 392ae74f96..249cc62d74 100644 --- a/backend/open_webui/utils/oauth.py +++ b/backend/open_webui/utils/oauth.py @@ -620,7 +620,7 @@ class OAuthClientManager: payload = json.loads(response_text) error = payload.get("error") error_description = payload.get("error_description", "") - except: + except Exception: pass else: error_description = response_text