summaryrefslogtreecommitdiff
path: root/crates/tor-dirclient/src/err.rs
Commit message (Collapse)AuthorAgeFilesLines
* dirclient: Use the new Tunnel interfaceDavid Goulet2025-08-051-0/+6
| | | | | | This entirely removes the requirement on ClientCirc. Signed-off-by: David Goulet <[email protected]>
* dirclient: treat excessive incoming cells as suspicious.Nick Mathewson2025-07-101-2/+3
|
* hs*: Define some HsDesc errors as _suspicious_.Nick Mathewson2025-07-101-0/+39
| | | | | These errors are suspicious as hsdir inflation attacks, in the context of prop360.
* dirclient: New error type for too-long headers.Nick Mathewson2025-07-101-0/+5
| | | | (This was previously called a parse error, which isn't right.)
* Fix typosDimitris Apostolou2024-09-031-1/+1
|
* Preserve HTTP status text in dirclient errors.Nick Mathewson2023-11-291-3/+3
| | | | | | | | The HTTP status text is often useful for diagnosing errors. Tor directory and hsdir caches frequently put useful messages there, especially when rejecting an uploaded document. Inspired by #1142.
* Privacy: Do not list supported encodings in hsdesc reqs.Nick Mathewson2023-10-161-1/+7
| | | | | | | | | | | | | Since not everybody has xz and/or zstd, we don't want to admit whether we support them when we are uploading or downloading an onion service descriptor. Similarly, if we aren't advertising support for an encoding, we shouldn't accept it. Finally, while we're doing this, it made sense to have the ability to mark requests based on how anonymized they are, and reject (some) attempts to send those requests over a one-hop circuit. Closes #1062
* 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.