Skip to content

fix(legacy): replace bare except with except Exception in utils#246

Open
Luka Aladashvili (llukito) wants to merge 1 commit into
langchain-ai:mainfrom
llukito:fix/bare-except-legacy-utils
Open

fix(legacy): replace bare except with except Exception in utils#246
Luka Aladashvili (llukito) wants to merge 1 commit into
langchain-ai:mainfrom
llukito:fix/bare-except-legacy-utils

Conversation

@llukito

Copy link
Copy Markdown

Description

Replaced a bare except: clause with except Exception as e: in src/legacy/utils.py.

Why this matters:
Even in legacy code, bare excepts are problematic as they catch BaseException types like KeyboardInterrupt and SystemExit. This change ensures that users can still terminate long-running processes (like Deep Research agents) via standard signals like Ctrl+C, while maintaining the existing fallback logic for standard errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant