summaryrefslogtreecommitdiff
path: root/crates/tor-rpcbase/src/err.rs
Commit message (Collapse)AuthorAgeFilesLines
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-1/+1
| | | | | | | | | | | | | | 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.
* rpcbase: Enforce validity on error datum keywords.Nick Mathewson2025-01-271-3/+10
|
* rpc: Include "data" field in error.Nick Mathewson2024-10-171-3/+43
| | | | | | | | In older versions of the rpc spec, this field held a serialized version of the Arti error object. That's no longer the design: now it provides a way for specific errors to include extra, specified, machine-readable data. For more information see the section "Errors" in rpc-meta-draft.md
* Remove Rpc* variants from tor_error::ErrorKindNick Mathewson2024-10-171-11/+4
| | | | | | | | | | | | | 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.)
* Tweak some RpcErrorKind member names.Nick Mathewson2024-10-171-4/+4
| | | | In some cases, the tor_error::ErrorKind names were nicer.
* rpc: Create a constructor for RpcError.Nick Mathewson2024-10-171-0/+14
| | | | | | | We'll use this to make RpcErrors directly, without having to go through an error that implements HasKind. Later, we'll add the ability to set the `data` fields on an RpcError.
* rpc: Allow the "RpcError.kinds" to be an RpcErrorKind.Nick Mathewson2024-10-171-10/+33
| | | | | This change will let us start removing the not-entirely-logical `Rpc.*` variants from tor_error::ErrorKind.
* rpc: Make RpcErrorKind public.Nick Mathewson2024-10-171-1/+2
|
* rpc: Rename RpcCode to RpcErrorKind.Nick Mathewson2024-10-171-6/+13
| | | | This is about to be a public competitor with tor_error::ErrorKind.
* rpc: Use an alias for RpcCode.Nick Mathewson2024-10-171-9/+10
|
* rpc: Remove prefix from RpcCode members.Nick Mathewson2024-10-171-20/+19
|
* tor-{error,rpcbase}: Add new RPC error codes from spec.Nick Mathewson2024-10-071-0/+6
| | | | | | 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.
* rpc: Remove special conversion for SendUpdateError.Nick Mathewson2024-07-251-10/+0
|
* rpc: Rename the error codes for something like consistency.Nick Mathewson2024-07-251-16/+17
|
* rpc: Remove RpcError data field and use ReportNick Mathewson2024-07-251-84/+20
| | | | | | | | | | | | Per discussion, this field isn't really specified in a way that lets us fill it sensibly at the moment. So for now, we're going to just omit it. Additionally, we said that we'd Report on our errors; this branch changes the implementation of RpcError to do that. Question: Will the blanket implementation for Into<RpcError> make it harder to re-add a Data field later on if we want to do so?
* rpc: Do not hide InvokeError::Bug when converting to RpcErrorNick Mathewson2024-07-251-18/+35
|
* rpc: split "method not found"Nick Mathewson2024-07-251-7/+7
| | | | | We've wanted separate error codes for "no such method exists" and "this method exists, but this object doesn't have it."
* Run maint/add_warning.Nick Mathewson2024-03-131-0/+1
|
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-231-0/+1
|
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+1
|
* RPC: Log all internal errors.Nick Mathewson2023-04-191-3/+7
|
* rpc: impl From<SendUpdateError> for RpcError.Nick Mathewson2023-04-191-0/+14
|
* rpc, spec: Document current ObjectError, RequestError behavior as correct.Nick Mathewson2023-04-131-10/+2
|
* rpcbase: Use correct error codes, and add tests.Nick Mathewson2023-04-121-6/+181
| | | | | | | | | | | Well, mostly correct. Our current serde implementation doesn't tell us much about what went wrong with the object, so we can't tell why we couldn't convert it into a Request. Also, our output for the data field is not as the spec says: we should bring them into conformance. Part of #825.
* tor-rpcbase: Create error kinds properly.Nick Mathewson2023-04-121-14/+16
| | | | | The field is called "kinds", it is a list, and it holds strings beginning with "arti:".
* tor-rpcbase: Rename and rephrase "command" to "method"Nick Mathewson2023-04-121-2/+2
|
* Rename tor-rpccmd to tor-rpcbase.Nick Mathewson2023-04-121-0/+77