Have Lox protocol functions return more descriptive errors
At the moment, when a client is preparing a request to the Lox authority for one of the protocol functions, the only return type is a ProofError::VerificationError
, which could indicate any number of potential reasons for failure, including:
- temporary and relatively common failure of not meeting the time threshold for unlocking the use of the protocol (e.g.,
level_up
). - a failure indicating misuse of the library (e.g., if the Lox and reachability credentials do not match)
- data corruption issues such as missing or invalid fields of the Lox credential
We're making assumptions in Tor Browser that the verification error is caused by the first case. While it still makes sense to return a ProofError
for some of the functions in lox-library::proto
, the request
functions in particular should return a different more variable error type.