FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Surface server errors during SSL negotiation by aryansk · Pull Request #1348 · MagicStack/asyncpg · GitHub

Surface server errors during SSL negotiation - #1348

Draft
aryansk wants to merge 1 commit into
MagicStack:masterfrom
aryansk:fix/1317-ssl-error-response
Draft

Surface server errors during SSL negotiation#1348
aryansk wants to merge 1 commit into
MagicStack:masterfrom
aryansk:fix/1317-ssl-error-response

Conversation

aryansk commented Aug 16, 2026

Copy link
Copy Markdown

Summary

Preserve the PostgreSQL server's diagnostic when it returns an early error while asyncpg is waiting for the one-byte SSL negotiation response.

Changes

  • recognize pre-auth responses beginning with the PostgreSQL ErrorResponse marker (E)
  • decode and surface the server-provided text as an asyncpg InterfaceError
  • retain the existing S, advisory N, and generic fallback behavior
  • add a unit regression test using the reported pre-auth response shape

Test plan

python -m unittest tests.test_connect.TestTLSUpgradeProto.test_error_response_preserves_server_message

Fixes #1317

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

TLSUpgradeProto.data_received hides PostgreSQL ErrorResponse behind generic 'rejected SSL upgrade' ConnectionError

1 participant


Back | FazBrowse Home | New Git URL