Skip to main content

abstract_ans_host/
error.rs

1use abstract_std::AbstractError;
2use cosmwasm_std::StdError;
3use cw_asset::AssetError;
4use thiserror::Error;
5
6#[derive(Error, Debug, PartialEq)]
7pub enum AnsHostError {
8    #[error(transparent)]
9    Std(#[from] StdError),
10
11    #[error(transparent)]
12    Abstract(#[from] AbstractError),
13
14    #[error(transparent)]
15    Asset(#[from] AssetError),
16
17    #[error(transparent)]
18    Ownership(#[from] cw_ownable::OwnershipError),
19
20    #[error("{} assets is not within range [{}-{}]", provided, min, max)]
21    InvalidAssetCount {
22        min: usize,
23        max: usize,
24        provided: usize,
25    },
26
27    #[error("Dex {} is not registered", dex)]
28    UnregisteredDex { dex: String },
29
30    #[error("Asset {} is not registered", asset)]
31    UnregisteredAsset { asset: String },
32}