pub enum Error {
InvalidInput {
field: &'static str,
reason: &'static str,
},
InvalidToken(Token),
Revoked(String),
Denied(Token),
Overloaded,
Datalog(Token),
}Expand description
Why a request or a token was rejected.
Every variant means “deny”: callers must never grant access on error.
Messages of Error::Denied, Error::InvalidToken and
Error::Datalog can quote Datalog written by the token holder, which
may carry arbitrary data: services should log and return Error::kind
only, and show full messages to people handling their own tokens.
Variants§
InvalidInput
A request field or command-line value is malformed.
InvalidToken(Token)
The token cannot be decoded or its signatures do not match the root key.
Revoked(String)
One of the token’s blocks carries a revoked identifier.
Denied(Token)
The token is valid but its checks or the verifier policies refuse the request.
Overloaded
The evaluation ran out of time. That may come from the load, and the request may then succeed when retried; a costly token can also time out every time. Access is refused meanwhile.
Datalog(Token)
Datalog could not be built (bad operator policy, internal error).
Implementations§
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()