paystack_transaction/
error.rs

1//ref: https://paystack.com/docs/api/errors
2
3/// Authentication Error types
4#[derive(thiserror::Error, Debug)]
5pub enum AuthError {
6    #[error("Your public key must be set")]
7    NoPublicKey,
8}
9
10/// Response Error wrapping error response from Paystack API
11#[derive(thiserror::Error, Debug)]
12pub enum ResponseError {
13    #[error("Paystack Error: {0}")]
14    PayStackError(String),
15    #[error("{0}; Couldn't verify transaction")]
16    TransactionVerificationError(bool),
17}