1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum Error {
5 #[error("Decode base64 fail, string is {0}")]
7 FailToB64uDecode(String),
8
9 #[error("Parse date fail, data is {0}")]
10 DateFailParse(String),
11
12 #[error("Key fail.")]
13 KeyFail,
14
15 #[error("Password not match.")]
16 PwdNotMatching,
17
18 #[error("Missing env: {0}")]
19 MissingEnv(&'static str),
20
21 #[error("Wrong format: {0}")]
22 WrongFormat(&'static str),
23}
24
25pub type Result<T> = core::result::Result<T, Error>;