-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy patherrors.rs
More file actions
40 lines (39 loc) · 1.25 KB
/
Copy patherrors.rs
File metadata and controls
40 lines (39 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! Error
//! ========
//! This file contains the structs and definitions of the errors in this crate.
use thiserror::Error;
/// Custom Error for the Paystack API
#[derive(Error, Debug)]
#[non_exhaustive]
pub enum PaystackAPIError {
/// Generic error, not used frequently
#[error("Generic error: {0}")]
Generic(String),
/// Error associated with Transaction operation
#[error("Transaction Error: {0}")]
Transaction(String),
/// Error associated with Charge
#[error("Charge Error: {0}")]
Charge(String),
/// Error associated with Transaction Split
#[error("Transaction Split Error: {0}")]
TransactionSplit(String),
/// Error associated with Subaccount
#[error("Subaccount Error: {0}")]
Subaccount(String),
/// Error associated with terminal
#[error("Terminal Error: {0}")]
Terminal(String),
/// Error associated with virtual terminal
#[error("Virtual Terminal Error: {0}")]
VirtualTerminal(String),
/// Error associated with customer
#[error("Customer Error: {0}")]
Customer(String),
#[error("Dedicated Virtual Account Error: {0}")]
DedicatedVirtualAccount(String),
#[error("Apple Pay Error: {0}")]
ApplePay(String),
#[error("Plan Error: {0}")]
Plan(String),
}