summaryrefslogtreecommitdiff
path: root/crates/tor-dirclient/src/err.rs
Commit message (Collapse)AuthorAgeFilesLines
* Suppress two clippy::large_enum_variant warningsNick Mathewson2022-11-031-0/+1
| | | | These are newly present on 1.65. We can address them later.
* tor-dirclient: impl HasKind for RequestFailedErrorIan Jackson2022-10-251-1/+7
|
* tor-dirclient: Introduce RequestError:HttpStatusIan Jackson2022-10-201-0/+5
|
* tor-dirclient: Make RequestFailed its own error typeIan Jackson2022-10-201-13/+19
| | | | | | | We're going to have functions on Response that fail by returning only one of these. Sadly this diff is quite noisy.
* Improve display for tor-dircache errors.Nick Mathewson2022-07-071-1/+14
| | | | | | | These errors no longer use Debug to dump the `Option<SourceInfo>`, but instead produce reasonable text. Also, I've fixed the SourceInfo Display implementation so that it now says that it got the error "from $source via $circuit" rather than the other way around.
* dirclient: Generalize MdSha256Empty to EmptyRequest.Nick Mathewson2022-07-071-4/+7
| | | | | (It makes sense to use this for things that are not in fact lists of SHA256 digests of Microdescriptors.)
* Do not include error source() in display() format.Nick Mathewson2022-06-211-3/+3
| | | | | | | | | According to doc/Errors.md, and in keeping with current best practices, we should not include display an error's `source()` as part of that error's display method. Instead, we should let the caller decide to call source() and display that error in turn. Part of #323.
* tor-dirclient: Require that self.digests is nonemptyNeel Chauhan2022-05-301-0/+5
|
* dirclient: add the ability to reject circuits that are too skewed.Nick Mathewson2022-05-111-0/+8
| | | | This will help implement #466.
* dirclient: Collect and expose peer information from errors.Nick Mathewson2022-03-211-11/+67
| | | | | | | | | | This commit refactors the dirclient error type into two cases: errors when constructing a circuit, and errors that occur once we already have a one-hop circuit. The latter can usually be attributed to the specific cache we're talking to. This commit also adds a function to expose the information about which directory gave us the info.
* Replace TorNetworkError with TorDirectoryErrorNick Mathewson2022-02-221-1/+1
| | | | | | This is still not as specific as we want; but there's already a TODO comment in tor-dirclient::err about fixing that at some point in the future.
* dirclient: Remove HttpStatus error variantNick Mathewson2022-02-171-5/+0
| | | | | | | Getting a non-200 status is no longer a failure condition; it's just a different kind of answer. Closes #349.
* Correct ErrorKinds for some tor-dirclient errors.Nick Mathewson2022-02-171-2/+2
|
* Rename ExitTimeout to RemoteNetworkTimeout.Nick Mathewson2022-02-171-1/+1
|
* tor-dirclient: Error::HttpError: add a TODO saying to abolishIan Jackson2022-02-171-0/+4
|
* Implement HasKind for tor_dirclient::ErrorNick Mathewson2022-02-161-0/+24
|
* dirclient: remove an unused error type.Nick Mathewson2022-02-161-4/+0
|
* Make TorError implement Clone.Nick Mathewson2022-02-041-3/+17
| | | | | This patch makes only minimal changes in lower-level error types: we have more refactoring to do.
* Stop using anyhow in tor-dirclient.Jani Monoses2021-09-161-0/+8
|
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-271-0/+65
This will cause some pain for now, but now is really the best time to do this kind of thing.