Skip to content

feat(error): add stable error hierarchy - #137

Open
0x676e67 wants to merge 20 commits into
mainfrom
demo/stable-error-hierarchy-111
Open

feat(error): add stable error hierarchy#137
0x676e67 wants to merge 20 commits into
mainfrom
demo/stable-error-hierarchy-111

Conversation

@0x676e67

@0x676e67 0x676e67 commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

This commit restores the InterruptError type that was removed in 1.2.5.

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

ConnectionResetError 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 linked an issue Jul 16, 2026 that may be closed by this pull request
Base automatically changed from demo/reject-forked-runtime-use-112 to main July 27, 2026 11:34
0x676e67 added 7 commits July 28, 2026 12:00
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?.
…ation-order-111

feat(error): stabilize error classification priority
@0x676e67

0x676e67 commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

necessary to design a stable error semantics handler for wreq-ruby, to prevent breaking changes caused by adjustments to upstream wreq’s error handling logic and newly introduced error variants.

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.

Provide a stable error hierarchy and safe, class-specific metadata

1 participant