Skip to content

fix: replace bare except clause with Exception in WebSocket heartbeat#1635

Open
hobostay wants to merge 1 commit into
eigent-ai:mainfrom
hobostay:fix/bare-except-clause
Open

fix: replace bare except clause with Exception in WebSocket heartbeat#1635
hobostay wants to merge 1 commit into
eigent-ai:mainfrom
hobostay:fix/bare-except-clause

Conversation

@hobostay
Copy link
Copy Markdown

Summary

  • Replace bare except: clause with except Exception: in server/app/domains/trigger/api/trigger_execution_controller.py line 339
  • A bare except: catches everything including SystemExit, KeyboardInterrupt, and GeneratorExit, which prevents graceful server shutdown and violates PEP 8
  • Changed to except Exception: which still catches all runtime errors but allows system-level signals to propagate correctly

Test plan

  • Verify WebSocket heartbeat still breaks correctly on connection errors
  • Verify server can be gracefully stopped with Ctrl+C (SIGINT) while WebSocket connections are active

🤖 Generated with Claude Code

A bare `except:` catches everything including SystemExit and
KeyboardInterrupt, making it impossible to gracefully shut down the
server. Changed to `except Exception:` to match the intent while
allowing system signals to propagate.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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