mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-04-18 16:12:52 +00:00
34 lines
825 B
Rust
34 lines
825 B
Rust
use prost::DecodeError;
|
|
use thiserror::Error;
|
|
|
|
pub type Result<T> = core::result::Result<T, UserDiscoveryError>;
|
|
|
|
#[derive(Error, Debug)]
|
|
pub enum UserDiscoveryError {
|
|
#[error("Store error: `{0}`")]
|
|
Store(String),
|
|
|
|
#[error("The encrypted announcement data contains malicious data: `{0}`")]
|
|
MaliciousAnnouncementData(String),
|
|
|
|
#[error("no shares left.")]
|
|
NoSharesLeft,
|
|
|
|
#[error("User discovery contains no configuration.")]
|
|
NotInitialized,
|
|
|
|
#[error("`{0}`")]
|
|
JsonError(#[from] serde_json::Error),
|
|
|
|
#[error("`{0}`")]
|
|
IoError(#[from] std::io::Error),
|
|
|
|
#[error("error while calculating shamirs secret shares: `{0}`")]
|
|
ShamirsSecret(String),
|
|
|
|
#[error("tried to push a invalid version")]
|
|
PushedInvalidVersion,
|
|
|
|
#[error("`{0}`")]
|
|
Prost(#[from] DecodeError),
|
|
}
|