aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-error/src/lib.rs
Commit message (Collapse)AuthorAgeFilesLines
* add_warning: add reference to arti#2556Jim Newsome2026-07-151-1/+1
|
* Removed unnecessary lintpryty262026-07-151-1/+1
| | | | Removed unnecessary lint
* maint: Run maint/add_warning to deny string slicesClara Engler2026-06-091-0/+1
| | | | | | | | | | | | This commit executes maint/add_warning with the just added change to deny string slices except in tests. I recommend auditing this by checking out the previous commit followed by running the script yourself and then verifying that the diff is identical to this commit. This commit makes cargo clippy fail. We will add exceptions in the next commit.
* tor-error: New ErrorKind for rejected documents.Nick Mathewson2026-05-121-2/+14
|
* Allow clippy::collapsible_if to triggerGabriela Moldovan2026-02-161-0/+1
| | | | | | | | | `clippy::collapsible_if` started triggering after bumping the MSRV to 1.88. Since this triggers from a lot of places, and since there even are a couple of instances where we explicitly allow `clippy::collapsible_ifs`, I've opened #2342 for deciding what to do about it.
* maint/add_warning: Run script to add new warningGabriela Moldovan2026-01-271-0/+1
| | | | This adds the lint to all our crates.
* tor-error: Provide a more reasonable API for http status codes.Nick Mathewson2025-11-181-1/+1
|
* tor-error: Add support for ErrorKind->HTTP status conversionNick Mathewson2025-11-181-0/+3
| | | | | | | It makes more sense to have the conversion here, so it can use an exhaustive match over ErrorKind. This isn't the final API; I'm just moving the code from `arti`.
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-1/+1
| | | | Run maint/add_warning
* Remove "doc_auto_cfg" incantation from all crates.Nick Mathewson2025-09-291-1/+1
| | | | This feature has been removed from nightly, in favor of doc_cfg.
* Temporarily suppress mismatched_lifetime_syntaxes.Gabriela Moldovan2025-07-071-0/+1
| | | | See #2060.
* netdoc: functionality for detecting missing subprotos.Nick Mathewson2025-04-161-0/+9
| | | | Also, add a new ErrorKind for this sort of error.
* clippy: deny `mod_module_files`Steven Engler2025-01-061-0/+1
| | | | | | Denies 'mod.rs' files for consistency. https://rust-lang.github.io/rust-clippy/master/index.html#mod_module_files
* add_warnings, *: Allow clippy::needless_lifetimesNick Mathewson2024-12-031-0/+1
| | | | | | | | In 1.83, this warning triggers on many of our crates. We're thinking of fixing them all, but for now, we're going to disable the warning. This is part of #1765.
* tor-error: add comment to `ErrorKind::TransientFailure`Steven Engler2024-11-211-0/+1
|
* Remove Rpc* variants from tor_error::ErrorKindNick Mathewson2024-10-171-40/+0
| | | | | | | | | | | | | These are not regular ErrorKinds, since they can never occur in an error that's meant to be returned from a Rust API like `arti-client`. Instead, they only exist for errors returned from RpcError. (I can't find the place where we discussed this previously, but the rationale is that if an ErrorKind never makes sense in response to something that the user does from Rust, we should never have that be an ErrorKind. The fact that the removed kinds do not actually appear outside the RPC system suggests that this is reasonable.)
* tor-error: Make "futures" dependency optional.Nick Mathewson2024-10-091-0/+1
| | | | | | This is part of an effort to make arti-rpc-client-core (and future similar tools) able to use our very-low-level crates without depending on things they don't need.
* tor-{error,rpcbase}: Add new RPC error codes from spec.Nick Mathewson2024-10-071-0/+11
| | | | | | These, like the other RPC-only error kinds, probably don't belong in `tor-error`. But for now, that's where they all are, and moving them is out of scope for this branch. See #1668.
* Upgrade to derive_more version 1.0.0Nick Mathewson2024-09-251-64/+62
| | | | | | The `derive_more` crate broke backward compatibility with this version, so this change involved quite a few manual fixups. With luck, they'll keep compatibility for some while in the future.
* tor-error: implement HasKind on void::Void and Infallible.Nick Mathewson2024-08-121-0/+12
| | | | | | | | | | | `void::Void` represents the type of an object that can't be constructed. It's especially useful as the error type of an infallible function. `void::Void` already implements `std::error::Error`, so all we need to do to use it as a "can't happen" error type in our code is to have it also implement `HasKind`. Also implement HasKind for Infallible while we're at it.
* rpc: Rename the error codes for something like consistency.Nick Mathewson2024-07-251-1/+1
|
* rpc: split "method not found"Nick Mathewson2024-07-251-0/+6
| | | | | We've wanted separate error codes for "no such method exists" and "this method exists, but this object doesn't have it."
* Re-run maint/add_warning.Nick Mathewson2024-05-061-2/+2
| | | | This commit is automatically generated.
* tor-error: Fix message for LocalResourceExhaustedIan Jackson2024-04-231-1/+1
|
* tor-error: Add ErrorKind::LocalResourceExhaustedIan Jackson2024-04-231-0/+6
|
* deny clippy::unchecked_duration_subtractiontrinity-1686a2024-02-291-0/+1
|
* tor-error: ErrorReport: sealIan Jackson2023-12-121-0/+6
| | | | | | We're going to need to make change to this trait which would be breaking for out-of-crate implementors. This should have been sealed all along.
* tor-error: Introduce ErrorKind::LocalResourceAlreadyInUseIan Jackson2023-12-111-0/+22
| | | | | | | | Our HSS code isn't going to work if you run more than one copy. Soon we'll detect this (via our use of tor_persist). There may be other places this ought to be used. Eg if we get EADDRINUSE from trying to set up a proxy, maybe ...
* tor-error: Remove KeystoreFsPermissions variant.Gabriela Moldovan2023-08-081-12/+0
| | | | | | | | According to the `ErrorKind` lumping guidelines, `KeystoreFsPermissions` should be lumped with `FsPermissions`: they represent the same type of error, and their "location" is the same ("Host"). Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1315#note_2916455
* Run add_warnings on all files.Nick Mathewson2023-08-041-2/+2
|
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+1
|
* Merge branch 'report-bugs-v2' into 'main'Nick Mathewson2023-07-071-0/+3
|\ | | | | | | | | Optional tracing support in tor-error for error reporting See merge request tpo/core/arti!1379
| * tor-error: Add optional tracing supportNick Mathewson2023-07-071-0/+3
| | | | | | | | | | | | | | | | | | | | The main contribution here is a set of convenience macros for logging error `Report`s. Notably, this macros always logs `Internal` and `BadAspiUsage` errors at `WARN`, unless they are already at `ERROR` or more. This is a little tricky because `tracing::event!()` requires its Level argument to be a constant.
* | Run add_warning to remove `missing_panics_doc` deny.Nick Mathewson2023-07-061-1/+0
|/ | | | Closes #950.
* 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: 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-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.