bvs_registry/
error.rs

1use cosmwasm_std::StdError;
2use thiserror::Error;
3
4#[derive(Error, Debug, PartialEq)]
5pub enum ContractError {
6    #[error("{0}")]
7    Std(#[from] StdError),
8
9    #[error("{0}")]
10    Pauser(#[from] bvs_pauser::api::PauserError),
11
12    #[error("{0}")]
13    Ownership(#[from] bvs_library::ownership::OwnershipError),
14
15    #[error("Unauthorized")]
16    Unauthorized {},
17
18    #[error("Service has been registered")]
19    ServiceRegistered {},
20
21    #[error("Operator has been registered")]
22    OperatorRegistered {},
23
24    #[error("Invalid registration status: {msg}")]
25    InvalidRegistrationStatus { msg: String },
26
27    #[error("Invalid slashing parameters: {msg}")]
28    InvalidSlashingParameters { msg: String },
29
30    #[error("Invalid slashing opt-in: {msg}")]
31    InvalidSlashingOptIn { msg: String },
32}