summaryrefslogtreecommitdiff
path: root/crates/arti-client/src/err.rs
Commit message (Collapse)AuthorAgeFilesLines
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-1/+1
| | | | Run maint/add_warning
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-6/+14
| | | | | | | | | | | | | | First, run ``` git grep -l "^edition =" | xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;' ``` Second, manually verify that all Cargo.toml files have changed, and nothing else has changed. Third, run cargo fmt again.
* arti-client: Use the new Tunnel interfaceDavid Goulet2025-08-051-1/+1
| | | | Signed-off-by: David Goulet <[email protected]>
* Use new DisplayRedacted/DebugRedacted code for HsId.Nick Mathewson2025-07-311-3/+3
| | | | Closes #2012.
* Implement HasKind trait for TorAddrErrorVijaya Bhaskar2025-04-271-2/+2
| | | | | | | | | This commit implements the HasKind trait for TorAddrError in address.rs, mapping all variants to the InvalidStreamTarget error kind. It also updates the ErrorDetail implementation in err.rs to delegate to TorAddrError's HasKind implementation instead of hardcoding the error kind. Resolves TODOs in address.rs and err.rs.
* arti,arti-client: Add an option to override required protocolsNick Mathewson2025-04-161-1/+2
| | | | | (This isn't a boolean, because we really don't want people ignoring all possible required protocols.)
* arti-client: Implement the basics of protocol enforcement.Nick Mathewson2025-04-161-0/+19
| | | | This is the major part of #1849.
* arti-client: Add ErrorDetail::OnionServiceSetuphjrgrn2025-04-141-0/+7
|
* arti-client: Clarify when BadOnionAddress is returned.Gabriela Moldovan2024-11-041-0/+2
| | | | | We only ever return `BadOnionAddress` is we are asked to connect to a .onion address that doesn't parse.
* tor-hscrypto: Abolish the HasKind impl of HsIdParseError.Gabriela Moldovan2024-11-041-1/+1
| | | | | | | | | | Also changes the `ErrorKind` of `BadOnionAddress` to `ForbbiddenStreamTarget`. See context in https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2246#note_3045683 Closes #1483
* arti-client: Provide another variant for memquota errorsIan Jackson2024-10-031-0/+5
| | | | | | During startup we'll call a few not-just-at-startup memquota methods which produce tor_memquota::Error, rather than StartupError. So we need a variant for that.
* arti-client: Change the case of ErrorDetail::MemquotaSetup from MemQuotaSetupIan Jackson2024-09-261-2/+2
| | | | | It turns out that my fingers want to treat "memquota" as a word. We have this in tor_memquota etc. too.
* arti-client: minor documentation grammar fixSteven Engler2024-09-051-1/+1
|
* memory quota error message: Fix emacs-induced typoIan Jackson2024-09-041-1/+1
|
* Provide a MemoryQuotaTracker in TorClientIan Jackson2024-09-041-0/+5
| | | | Nothing uses this yet.
* arti-client: Correct message for mistrust errorIan Jackson2024-07-101-1/+1
|
* Fix recursive impl for arti_client::Error.Nick Mathewson2024-04-221-1/+1
| | | | This is an actual bug. Closes #1379.
* Run maint/add_warning.Nick Mathewson2024-03-131-0/+1
|
* tor-circmgr: Give CircMgr a VanguardMgr.Gabriela Moldovan2024-03-111-0/+14
| | | | Closes #1277
* Fix typos in doc commentsTobias Stoeckmann2024-03-061-1/+1
|
* arti-client: Fix typo in error message.Gabriela Moldovan2024-03-051-1/+1
|
* Refactor and improve error hinting.Nick Mathewson2024-02-141-49/+5
| | | | | | | | | | | | Instead of using complicated match statements, use downcasting to find error types that define specific hints. This also lets us define a reasonable hint-extractor for anyhow::Error, and use it when reporting errors in main. I've left an implementation of hint() in `impl Error`, to avoid breaking backward compatibility. Closes #1165.
* arti-client: Add ErrorDetail::KeystoreRequired.Gabriela Moldovan2024-01-111-0/+9
| | | | | This addresses a `TODO HSS` about not using `internal!` for an error caused by misconfiguration.
* tor-keymgr: ArtiPathSyntaxError: rename from ArtiPathErrorIan Jackson2023-12-071-1/+1
| | | | | The previous name was ambiguous, and confusable with KeyPathError (of which it is, basically, a variant).
* tor-hsclient, arti-client: Make BadClientSpecifier wrap an ArtiPathError.Gabriela Moldovan2023-10-191-1/+1
|
* tor-keymgr: Use ArtiPathError for invalid ArtiPaths.Gabriela Moldovan2023-10-191-0/+5
|
* arti-client: add a minimal onion-service-launching API.Nick Mathewson2023-09-271-0/+8
|
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-231-0/+1
|
* arti-client: Fix a couple more typos.Nick Mathewson2023-08-221-1/+1
| | | | I spotted these while I was working on something else.
* Resolve warnings about ambiguous/redundant doc linksNick Mathewson2023-08-221-2/+2
| | | | | Nightly rustdoc now warns if you have a link that isn't necessary, and if you have a link that might refer to two different things.
* Fix and expand the description of OnionAddressDisabledNick Mathewson2023-08-031-2/+9
| | | | | Previously there was a missing "not", and it didn't say what to do about the error.
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+1
|
* arti-client: Rename KeyStore to Keystore.Gabriela Moldovan2023-06-301-1/+1
| | | | | | | | | | | | | `KeyStore` was renamed to `Keystore` globally in !1355. This fixes a compile error caused an unfortunate series of non-conflicting (from git's POV) but incompatible merges: * !1356 added a line threferencing an error variant that capitalizes the "s" in "KeyStore" (`ErrorDetail::KeyStore`) * !1356 landed just before !1355 (the global renaming). Since there was no conflict between the 2, we're now in a state where the code added in !1356 is referencing an `ErrorDetail` variant that no longer exists.
* Merge branch 'keymgr-naming' into 'main'Alexander Færøy2023-06-301-2/+2
|\ | | | | | | | | keymgr: Rename KeyStore to Keystore globally. See merge request tpo/core/arti!1355
| * keymgr: Rename KeyStore to Keystore globally.Gabriela Moldovan2023-06-291-2/+2
| | | | | | | | | | We've been capitalizing the "s" in "KeyStore" inconsistently. This `s/KeyStore/Keystore/g` across the codebase.
* | keymgr: Fix another infinite loop around Keymgr error handling.Gabriela Moldovan2023-06-291-1/+1
|/ | | | This `From` impl was just calling itself recursively...
* arti_client: Move BadOnion from TorAddrError to ErrorDetail.Nick Mathewson2023-06-291-10/+7
| | | | | | | | | | This variant can never be constructed when parsing a TorAddr, so it doesn't make sense to have it in TorAddrError: the use can never see it unless they enable `error_detail`. Not a semver break because the client feature is not yet stable. Closes #932.
* keymgr: Move dummy implementation to tor-keymgr.Gabriela Moldovan2023-06-221-3/+3
|
* arti-client: Add an Error type for the dummy key manager.Gabriela Moldovan2023-06-201-6/+3
| | | | Part of #897
* arti-client: Provide ErrorDetailDiscriminants for convenient testingIan Jackson2023-06-161-0/+2
| | | | | ErrorDetail isn't PartialEq so we can't assert_eq! it. But the discriminants will be.
* arti-client: StreamPrefs::connect_to_onion_services: honourIan Jackson2023-06-161-0/+7
|
* arti-client: OnionAddressNotSupported: Change description and kindIan Jackson2023-06-161-3/+3
| | | | | Previously this error meant "we haven't written this code yet". Now, we change it to "you haven't built Arti with this feature".
* arti-client: Rename hs feature to onion-service-client (cfg lines)Ian Jackson2023-06-161-8/+8
|
* arti-client: Use a dummy key manager if the keymgr feature is disabled.Gabriela Moldovan2023-06-151-3/+3
| | | | | | | | | TorClient now only uses the tor_keymgr::KeyMgr implementation if the keymgr experimental feature is enabled. If the feature is disabled, a dummy key manager implementation is used. The new `keymgr` feature depends on `onion-client`, because the key manager is only used for HS client auth.
* arti-client: Implement From<tor_keymgr::Error> for Error.Gabriela Moldovan2023-06-151-0/+7
|
* arti-client: Make the client use the KeyMgr.Gabriela Moldovan2023-06-151-0/+7
| | | | | `TorClient` now uses a `KeyMgr` to retrieve the `HsClientSecretKeys` client auth keys passed to `get_or_launch_connection`.
* tor-hsconn: Rename ConnError (from HsClientConnError)Ian Jackson2023-03-301-2/+2
| | | | | The old name was unwieldy and other crates can just as well name it by the crate scope.
* Tidy up an unused import warningIan Jackson2023-03-281-1/+3
| | | | | | Now cargo +stable clippy --locked --offline --workspace --all-targets is clean.
* arti-client: Include redacted HsId in ObtainHsCircuit errorIan Jackson2023-03-231-3/+3
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1071/diffs?commit_id=580fe1118dbbbfa086d11b28e3e26d7c91afe21c#fbd7ab2d6d0a5b515697d4f9f99a42ebd508aa4b_153_165
* arti-client: Call tor-hsclient to create HS connectionsIan Jackson2023-03-231-0/+16
| | | | | Obviously this still doesn't work because the actual impl in hsclient is just a todo!().