Skip to main content

pryzm_auth/
error.rs

1use cosmwasm_std::StdError;
2use thiserror::Error;
3
4#[derive(Error, Debug)]
5pub enum AuthError {
6    #[error("{0}")]
7    Std(#[from] StdError),
8
9    #[error("Unauthorized")]
10    Unauthorized {},
11
12    #[error("Paused")]
13    Paused {},
14}
15
16impl From<AuthError> for StdError {
17    fn from(err: AuthError) -> Self {
18        StdError::generic_err(err.to_string())
19    }
20}