Skip to content

Preserve transport ConnectErrors in client calls#199

Open
fallintoplace wants to merge 1 commit into
anthropics:mainfrom
fallintoplace:preserve-transport-connect-errors
Open

Preserve transport ConnectErrors in client calls#199
fallintoplace wants to merge 1 commit into
anthropics:mainfrom
fallintoplace:preserve-transport-connect-errors

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

Summary

  • preserve transport-produced ConnectErrors instead of remapping them to Unavailable
  • apply the shared transport error mapper across unary, unary GET, server-streaming, client-streaming, and bidi client calls
  • add regressions covering the real plaintext-client-to-https:// configuration mismatch across all five call shapes

Why

HttpClient::send() already classifies local scheme/config mismatches as InvalidArgument, but the higher-level client call helpers wrapped every transport error as Unavailable. That made local caller bugs look like retryable outages and obscured the real cause.

Impact

  • local transport/configuration mistakes now retain their original ConnectError classification
  • generic transport failures still map to Unavailable
  • wrapped transport errors that carry a ConnectError in their source chain are preserved too

Validation

  • cargo test -p connectrpc --features client preserves_transport_connect_error
  • cargo test -p connectrpc transport_send_error_mapper_preserves_connect_error_in_source_chain
  • cargo test -p connectrpc --features client http_client_plaintext_rejects_https

@github-actions

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

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