summaryrefslogtreecommitdiff
path: root/crates/tor-dirclient/src/response.rs
Commit message (Collapse)AuthorAgeFilesLines
* Allow clippy::unchecked_duration_subtraction in testsNick Mathewson2023-01-271-0/+1
| | | | | This panics on error, and we're fine with a panic on misbehavior in tests.
* tor-dirclient: Replace OwnedChanTarget with LoggedChanTarget in SourceInfoIan Jackson2022-11-231-4/+4
| | | | | | | | | | | | | | | | SourceInfo primarily appears in errors, here and in (indirectly) tor-dirmgr. This 1. Makes the errors smaller 2. Redacts (currently, scrubs) the chantarget when safe logging is enabled This commit therefore deals with both tor-dirmgr and tor-dirclient errors, from the pov of error information that should become sensitive as part of bridge support. The error pyaloads directly in tor_dirmgr/src/err.rs don't seem to contain anything in that category.
* tor-dirclient: Response: Provide into_output_stringIan Jackson2022-11-031-0/+11
| | | | | This is the missing one of the full set. It turns out that I wanted this rather than the non-consuming output_string.
* tor-dirclient::DirResponse: provide output_stringIan Jackson2022-10-251-0/+17
| | | | This gives callers a nice error type with source and everything.
* tor-dirclient: Provide fallible DirResponse::output and into_outputIan Jackson2022-10-201-1/+80
|
* tor-dirclient: Make DirResponse be CloneIan Jackson2022-10-201-1/+1
| | | | I want this for testing. It seems friendly to provide it, though.
* tor-dirclient Response: Rename output methodsIan Jackson2022-10-201-2/+6
| | | | | These don't check errors and are therefore quite hazardous. I'm going to introduce a more cooked version in a moment.
* Improve display for tor-dircache errors.Nick Mathewson2022-07-071-1/+1
| | | | | | | 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.
* Fix a portability issue with Rust 1.56Nick Mathewson2022-05-161-1/+1
|
* DirMgr: Improve display for DocSourceNick Mathewson2022-05-161-1/+2
| | | | (Also, implement Display for tor_dirclient::SourceInfo).
* dirclient: Collect and expose peer information from errors.Nick Mathewson2022-03-211-4/+4
| | | | | | | | | | 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.
* dirclient: Remember the source of each resposne we receive.Nick Mathewson2022-03-211-6/+15
|
* Tests for tor-dirmgr::bootstrapNick Mathewson2021-11-111-0/+5
|
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-271-0/+91
This will cause some pain for now, but now is really the best time to do this kind of thing.