summaryrefslogtreecommitdiff
path: root/crates/tor-error/src
Commit message (Collapse)AuthorAgeFilesLines
* tor-error: Make KeystoreFsPermissions experimental for nowIan Jackson2023-06-291-0/+3
| | | | Let's defer this decision.
* tor-error: Add KeystoreAccessFailed, KeystoreFsPermissions to ErrorKind.Gabriela Moldovan2023-06-281-0/+19
|
* tor-error: Add KeystoreCorrupted to ErrorKind.Gabriela Moldovan2023-06-281-0/+10
|
* tor-error: Mark define_asref_dyn_std_error as non-experimentalNick Mathewson2023-06-231-1/+0
| | | | | (I see no problems with this macro. In the worst case, we deprecate it someday.)
* tor-error: Stabilize OnionService error kindsNick Mathewson2023-06-221-7/+0
|
* tor-error: typo fix in a comment.Nick Mathewson2023-06-221-1/+1
|
* Remove onion service descriptor-related errorkinds.Nick Mathewson2023-06-221-46/+0
| | | | | | | | These have been subsumed by other errorkinds, mostly OnionServiceProtocolViolation and TorProtocolViolation. In particular please review the change in tor-hsclient closely; I am not sure about the new errorkinds for the error there.
* Merge branch 'socks_errorkinds' into 'main'Nick Mathewson2023-06-221-16/+6
|\ | | | | | | | | | | | | Generate correct-ish socks5 errors for onion service errors. Closes #736 See merge request tpo/core/arti!1279
| * New ErrorKind for invalid onion addressesNick Mathewson2023-06-221-0/+9
| | | | | | | | Use this to emit HS_BAD_ADDRESS as appropriate.
| * Remove ErrorKind::OnionService{Intro,Rend}FailedNick Mathewson2023-06-221-19/+0
| | | | | | | | | | These errors are orthogonal to our actual error kinds. See discussion on #736.
* | Merge branch 'stderr' into 'main'Alexander Færøy2023-06-211-0/+2
|\ \ | |/ |/| | | | | lints: Promote clippy::print_stderr and clippy::print_stdout See merge request tpo/core/arti!1271
| * lints: Run maint/add_warning to actually apply new lintsIan Jackson2023-06-211-0/+2
| |
* | Add and use ErrorKinds for remaining onion service errorsNick Mathewson2023-06-211-0/+36
|/
* tor-error: Introduce `LooseCmpRetryTime`Ian Jackson2023-06-151-0/+19
| | | | | Having a newtype for this kind of thing is considerably more convenient. I'm going to use this in a moment.
* tor-hsclient: Conduct the INTRODUCE1 exchangeIan Jackson2023-06-131-0/+10
|
* tor-error: Clarify what we mean by "hostile".Gabriela Moldovan2023-06-121-1/+1
| | | | Signed-off-by: Gabriela Moldovan <[email protected]>
* tor-error: Document another potential cause for ↵Gabriela Moldovan2023-06-121-0/+4
| | | | | | OnionServiceDescriptorValidationFailed. Signed-off-by: Gabriela Moldovan <[email protected]>
* tor-error: Extend applicability of RemoteNetworkTimeoutIan Jackson2023-06-091-1/+6
| | | | | We're going to use this for rendezvous completion timeout, which could be due to basically anything.
* tor-hsclient: impl HasKind for InvalidTarget: ..DescriptorValidationFailedIan Jackson2023-06-091-2/+4
| | | | | | This basically always means we couldn't cope with the descriptor. We need to extend the description of OnionServiceDescriptorValidationFailed
* tor-error: Introduce define_asref_dyn_std_error and use itIan Jackson2023-06-091-0/+17
| | | | | This factors out an ad-hoc AsRef impl. We're going to want to reuse this for another error type.
* tor-error: Add a TODO regarding HS desc parsing errors.Gabriela Moldovan2023-05-031-0/+14
| | | | Signed-off-by: Gabriela Moldovan <[email protected]>
* Clarify what the new ErrorKinds mean.Gabriela Moldovan2023-05-031-4/+14
| | | | Signed-off-by: Gabriela Moldovan <[email protected]>
* hsclient: Use a real HsDesc instead of an unparsed string.Gabriela Moldovan2023-05-031-0/+16
| | | | Signed-off-by: Gabriela Moldovan <[email protected]>
* tor-error: Add ErrorKinds for RPC errors.Nick Mathewson2023-04-121-0/+23
| | | | | These are experimental for now so that we can change them without breaking semver.
* Merge branch 'bug804' into 'main'Nick Mathewson2023-04-111-10/+3
|\ | | | | | | | | | | | | s/ProtocolFailed/ProtocolViolation/g where possible Closes #804 See merge request tpo/core/arti!1121
| * s/ProtocolFailed/ProtocolViolation/g where possibleNeel Chauhan2023-04-081-10/+3
| |
* | Use an Enum for the description requesttranna2023-04-101-1/+1
|/
* tor-error: Rename ErrorKind::TorDirectoryUsable (from ...Broken)Ian Jackson2023-04-061-3/+3
| | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1117#note_2893986 (Not going to squash this as it has a semantic conflict with !1118, so needs a little special handling there.)
* tor-error: Introduce ErrorKind::TorDirectoryBrokenIan Jackson2023-04-051-0/+16
| | | | | | We will use this for a lack of HS directories. (These aren't chosen according to any local restrictions, so the problems with EK::NoPath and EK::NoExit don't arise.)
* tor-error: Add OnionServiceNotRunning errorIan Jackson2023-03-311-0/+13
| | | | | | We'll want this later. Define it now, though, since we've discussed it here https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1099#note_2892020
* tor-error: Put OnionService errors behind a new experimental-api featureIan Jackson2023-03-311-0/+2
|
* tor-error: Errors for hidden servicesIan Jackson2023-03-311-0/+18
| | | | | | | So far these are just the errors that occur during descriptor fetch. There will be more later as we have more code in tor-hsconn. This is very user-facing; use the "onion service" terminology.
* Allow clippy::unchecked_duration_subtraction in testsNick Mathewson2023-01-273-0/+3
| | | | | This panics on error, and we're fine with a panic on misbehavior in tests.
* Disable clippy::unlinlined-format-argsNick Mathewson2023-01-271-0/+1
| | | | | | | | This warning kind of snuck up on us! (See #748) For now, let's disable it. (I've cleaned it up in a couple of examples, since those are meant to be more idiomatic and user-facing.) Closes #748.
* Fix typosDimitris Apostolou2023-01-071-1/+1
|
* Merge branch 'test-lints' into 'main'eta2023-01-062-0/+18
|\ | | | | | | | | Add test lint blocks to all "mod test" See merge request tpo/core/arti!937
| * test lint blocks: Add many many automaticallyIan Jackson2022-12-122-0/+18
| | | | | | | | | | This is precisely the result of running the rune in maint/adhoc-add-lint-blocks.
* | tor-error: tests: Add a test case for Report and Bug wrappingIan Jackson2022-12-151-0/+11
| |
* | tor-error: Provide ErrorReport extension trait with .report() methodIan Jackson2022-12-121-0/+32
| |
* | tor_error: Promote internal StdError alias to reportIan Jackson2022-12-121-5/+5
|/ | | | | The std::error::Error repetition was getting rather repetitively repetitious, and is about to get more so.
* Rename LocalLoginFailed to ExternalToolFailed.Nick Mathewson2022-11-291-2/+2
|
* Document better what LocalProtocolViolation does not cover.Nick Mathewson2022-11-291-1/+4
|
* ptmgr: Fill in some error-related code; resolve TODOs.Nick Mathewson2022-11-281-0/+5
|
* Use ErrorKind::TorAccessFailed for misbehaving bridgesIan Jackson2022-11-081-2/+3
| | | | (Use semantic linefeed for the doc comment.)
* Run add_warnings.Nick Mathewson2022-11-031-0/+1
|
* tor-error: Tidy up use of thiserror::ErrorIan Jackson2022-10-241-2/+4
| | | | | | | | 1. Import it, as we do elsewhere, and use that import. 2. Use thiserror to generate the Display impl, rather than derive_more, as we do for errors elsewhere. (tor_error still needs derive_more::Display for ErrorKind.)
* tor-error: Rename truncated module to miscIan Jackson2022-10-242-3/+3
| | | | | This has no external API change, but makes space for other miscellaneous errors to arrive later.
* tor-error: make HasRetryTime object-safeIan Jackson2022-10-211-0/+1
| | | | | | | | We could in the future provide a version of abs_retry_time which took an &dyn closure if that turns out to be wanted. I think this isn't a semver break because trait implementors are allowed to relax bounds.
* cargo fmt to remove blank linesIan Jackson2022-10-121-1/+0
| | | | | | | Apparently cargo fmt doesn't like these, which my perl rune didn't delete. This commit is precisely the result of `cargo fmt`.
* Replace all README copies in src/lib.rs with includesIan Jackson2022-10-121-7/+1
| | | | | | | | The feature we want is `#[doc = include_str!("README.md")]`, which is stable since 1.54 and our MSRV is now 1.56. This commit is precisely the result of the following Perl rune: perl -i~ -0777 -pe 's{(^//!(?!.*\@\@).*\n)+}{#![doc = include_str!("../README.md")]\n}m' crates/*/src/lib.rs