De-redundantize Error kinds. (#259)
Change "Bad" to "Invalid" in error names, mimicking io::Error::ErrorKind. Change InvalidProxyCreds to ProxyUnauthorized. Change DnsFailed to just Dns (the fact that there was a failure is implicit in the fact that this was an error).
This commit is contained in:
committed by
GitHub
parent
57f251d766
commit
6c9378ce37
@@ -108,7 +108,7 @@ impl Request {
|
||||
let mut url: Url = match self.url.clone() {
|
||||
Urlish::Url(u) => u,
|
||||
Urlish::Str(s) => s.parse().map_err(|e: url::ParseError| {
|
||||
ErrorKind::BadUrl
|
||||
ErrorKind::InvalidUrl
|
||||
.msg(&format!("failed to parse URL '{}'", self.url))
|
||||
.src(e)
|
||||
})?,
|
||||
|
||||
Reference in New Issue
Block a user