Skip to content

feat(error): stabilize error classification priority - #154

Merged
0x676e67 merged 4 commits into
demo/stable-error-hierarchy-111from
demo/stabilize-error-classification-order-111
Aug 3, 2026
Merged

feat(error): stabilize error classification priority#154
0x676e67 merged 4 commits into
demo/stable-error-hierarchy-111from
demo/stabilize-error-classification-order-111

Conversation

@0x676e67

@0x676e67 0x676e67 commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

This PR makes Ruby exception selection deterministic when a wreq error reports overlapping native details. Native error kinds keep their own class. Request errors use this priority: connection reset, timeout, proxy connect, then connect. Every matching detail remains available through predicate methods.

This is a breaking change. The public names now follow wreq's connect-stage terminology:

  • Wreq::ConnectionError becomes Wreq::ConnectError
  • Wreq::ProxyConnectionError becomes Wreq::ProxyConnectError
  • connection? becomes connect?
  • proxy_connection? becomes proxy_connect?

ConnectionResetError and connection_reset? keep their names because they describe a reset event rather than the connect phase. The old names are removed, so callers need to update rescue clauses and predicate checks.

The Ruby API docs now explain connect, proxy connect, timeout, and reset overlap. The complete Ruby and Rust test suites, Clippy, Rustfmt, and StandardRB pass on Windows GNU.

@0x676e67
0x676e67 force-pushed the demo/stabilize-error-classification-order-111 branch from 1a89b70 to 9f8d3b2 Compare July 31, 2026 07:24
0x676e67 added 3 commits July 31, 2026 15:33
BREAKING CHANGE: Wreq::ConnectionError and Wreq::ProxyConnectionError are replaced by Wreq::ConnectError and Wreq::ProxyConnectError. The connection? and proxy_connection? predicates are replaced by connect? and proxy_connect?.
@0x676e67
0x676e67 merged commit f392609 into demo/stable-error-hierarchy-111 Aug 3, 2026
10 checks passed
@0x676e67
0x676e67 deleted the demo/stabilize-error-classification-order-111 branch August 3, 2026 09:52
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