canic/spec/icrc/icrc21/
errors.rs1use candid::{CandidType, Deserialize, Nat};
2use serde::Serialize;
3
4#[derive(CandidType, Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
9pub struct ErrorInfo {
10 pub description: String,
11}
12
13#[derive(CandidType, Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
18pub enum Icrc21Error {
19 UnsupportedCanisterCall(ErrorInfo),
20 ConsentMessageUnavailable(ErrorInfo),
21 InsufficientPayment(ErrorInfo),
22 GenericError {
23 error_code: Nat,
24 description: String,
25 },
26}