rpc: Provide a list of ErrorKind strings
Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1107#note_2893078
This commit is contained in:
parent
9f8ba36814
commit
ef834a2c0b
|
@ -310,8 +310,23 @@ message
|
|||
or do anything with it besides display it to the end user.
|
||||
(This is generated by `tor_error::Report` or equivalant.)
|
||||
|
||||
arti_kind
|
||||
: A String denoting one of members of `tor_error::ErrorKind`.
|
||||
arti_kinds
|
||||
: An array of Strings, each
|
||||
denoting one of the members of `tor_error::ErrorKind`.
|
||||
|
||||
If Arti renames an `ErrorKind`,
|
||||
the old name will be provided after the new name.
|
||||
If an error is reclassified,
|
||||
Arti will provide the previous classification
|
||||
(the previously reported kind)
|
||||
after the current classification,
|
||||
if it's meaningful,
|
||||
and it's reasonably convenient to do so.
|
||||
|
||||
Therefore, a client which is trying to classify an error
|
||||
should look through the array from start to finish,
|
||||
stopping as soon as it finds a a recognised `ErrorKind`.
|
||||
|
||||
Note that this set may be extended in future,
|
||||
so a client must be prepared to receive unknown values from Arti,
|
||||
and fall back to some kind of default processing.
|
||||
|
|
Loading…
Reference in New Issue