canic_core/dto/icrc21/
errors.rs1use candid::{CandidType, Deserialize, Nat};
8use serde::Serialize;
9
10#[derive(CandidType, Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
15pub struct ErrorInfo {
16 pub description: String,
17}
18
19#[derive(CandidType, Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
24pub enum Icrc21Error {
25 UnsupportedCanisterCall(ErrorInfo),
26 ConsentMessageUnavailable(ErrorInfo),
27 InsufficientPayment(ErrorInfo),
28 GenericError {
29 error_code: Nat,
30 description: String,
31 },
32}