Skip to content

Wrap transport errors as FinTSConnectionError#215

Merged
raphaelm merged 1 commit into
raphaelm:masterfrom
mo22:mo22/wrap-transport-errors
Jun 2, 2026
Merged

Wrap transport errors as FinTSConnectionError#215
raphaelm merged 1 commit into
raphaelm:masterfrom
mo22:mo22/wrap-transport-errors

Conversation

@mo22
Copy link
Copy Markdown
Contributor

@mo22 mo22 commented May 13, 2026

Network-level failures during dialog initialization currently bubble up as arbitrary exceptions from requests/socket code. FinTSDialog.init catches those broad exceptions and re-raises FinTSDialogInitError with an authentication-focused message, which makes DNS/TLS/TCP failures look like wrong credentials.\n\nThis wraps requests and socket-level failures from FinTSHTTPSConnection.send as FinTSConnectionError. FinTSDialog.init already preserves FinTSConnectionError, so callers can distinguish endpoint/transport failures from authentication failures.\n\nTested with:\n\n uv run --with pytest pytest tests/test_connection.py

@raphaelm raphaelm merged commit e3c916c into raphaelm:master Jun 2, 2026
4 checks passed
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.27%. Comparing base (5ee7548) to head (37c0ac8).
⚠️ Report is 47 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #215      +/-   ##
==========================================
- Coverage   87.69%   86.27%   -1.43%     
==========================================
  Files          26       27       +1     
  Lines        3463     3833     +370     
==========================================
+ Hits         3037     3307     +270     
- Misses        426      526     +100     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants