Skip to content

fix(python): avoid masking health check errors - #1912

Open
nightcityblade wants to merge 1 commit into
pmxt-dev:mainfrom
nightcityblade:fix/issue-1790
Open

fix(python): avoid masking health check errors#1912
nightcityblade wants to merge 1 commit into
pmxt-dev:mainfrom
nightcityblade:fix/issue-1790

Conversation

@nightcityblade

Copy link
Copy Markdown

What problem this solves

The Python sidecar health check caught every Exception, which hid unexpected programming errors and made all failures indistinguishable from an unavailable server.

Why this change was made

The handler now catches only expected I/O and malformed-response failures, records them at debug level, and lets unexpected exceptions propagate.

User impact

Normal connection and malformed-health-response failures still report an unhealthy server, while unrelated defects retain their original traceback for diagnosis.

Evidence

  • python -m pytest tests/test_server_manager.py -q — 4 passed
  • python -m mypy --follow-imports=skip --ignore-missing-imports sdks/python/pmxt/server_manager.py — passed
  • python -m black --check sdks/python/tests/test_server_manager.py — passed

Fixes #1790

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.

empty-catch: sdks/python/pmxt/server_manager.py:498 — redundant bare Exception in except tuple masks health-check failures with no logging

1 participant