feat(error): add stable error hierarchy - #137
Open
0x676e67 wants to merge 20 commits into
Open
Conversation
…ror-hierarchy-111
…ror-hierarchy-111
…ror-hierarchy-111 # Conflicts: # src/error.rs
…ror-hierarchy-111 # Conflicts: # lib/wreq_ruby/error.rb
…ror-hierarchy-111
…ror-hierarchy-111
…ror-hierarchy-111 # Conflicts: # lib/wreq_ruby/error.rb # src/error.rs
…e-error-classification-111
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
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. |
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit restores the
InterruptErrortype that was removed in1.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::ConnectionErrorbecomesWreq::ConnectErrorWreq::ProxyConnectionErrorbecomesWreq::ProxyConnectErrorConnectionResetErrorkeep 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.