-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(error): preserve
InvalidUri
details
This branch changes the representation of the `Parse::Uri` error kind to preserve information provided by the `http` crate's `uri::InvalidUri` and `uri::InvalidUriParts` errors. A new `InvalidUri` enum is added that holds one of those two error types, or a custom message (since `hyper` currently returns `Parse::Uri` errors that didn't come from an inner `http` error in some cases). The new enum has a custom `Display` and `Debug` implementation to reduce repetition of the string "invalid URI" in its formatted output. This is _not_ stored as the error's `cause` currently in order to avoid exposing the `http` crate's error types in the public API. However, when `http` 1.0 is released, we can simplify this code significantly by storing the error as a cause and exposing it in the source chain. Closes #3043
- Loading branch information
Showing
2 changed files
with
46 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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