1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//ref: https://paystack.com/docs/api/errors

/// Authentication Error types
#[derive(thiserror::Error, Debug)]
pub enum AuthError {
    #[error("Your public key must be set")]
    NoPublicKey,
}

/// Response Error wrapping error response from Paystack API
#[derive(thiserror::Error, Debug)]
pub enum ResponseError {
    #[error("Paystack Error: {0}")]
    PayStackError(String),
}