1#[derive(Debug, thiserror::Error)]
3pub enum GoogleApiError {
4 #[error("OpenSSL error stack `{0}`")]
6 OpenSSLError(#[from] openssl::error::ErrorStack),
7 #[error("JWT error `{0}`")]
9 JwtError(#[from] jwt::Error),
10 #[error("Reqwest error `{0}`")]
12 ReqwestError(#[from] reqwest::Error),
13 #[error("Token retrieval error `{0}`")]
15 TokenRetrivalError(String),
16 #[error("Error sending email `{0}`")]
18 EmailSendError(String),
19 #[error("Failed to load service account file `{0}`")]
21 ServiceAccountLoadFailure(std::io::Error),
22 #[error("Serialization error `{0}`")]
24 SerdeError(#[from] serde_json::Error),
25}
26
27pub type Result<T> = std::result::Result<T, GoogleApiError>;