Skip to main content

lox_library/proto/
errors.rs

1use thiserror::Error;
2
3/// This error is thrown if the number of buckets/keys in the bridge table
4/// exceeds u32 MAX.It is unlikely this error will ever occur.
5#[derive(Error, Debug)]
6pub enum CredentialError {
7    #[error("time threshold for operation will not be met for {0} more days")]
8    TimeThresholdNotMet(u32),
9    #[error("credential has expired")]
10    CredentialExpired,
11    #[error("invalid field {0}: {1}")]
12    InvalidField(String, String),
13    #[error("exceeded blockages threshold")]
14    ExceededBlockagesThreshold,
15    #[error("credential has no available invitations")]
16    NoInvitationsRemaining,
17    #[error("supplied credentials do not match")]
18    CredentialMismatch,
19}