price_feeds/
error.rs

1use cosmwasm_std::StdError;
2use thiserror::Error;
3
4#[derive(Error, Debug)]
5pub enum ContractError {
6    #[error("{0}")]
7    Std(#[from] StdError),
8
9    #[error("Unauthorized")]
10    Unauthorized {
11        function : String
12    },
13
14    #[error("PriceDoesNotExist")]
15    PriceDoesNotExist{
16        symbol : String
17    }, 
18
19    #[error("InvalidExecuteMsg")]
20    InvalidExecuteMsg{},
21
22    #[error("PriceFeedExists")]
23    PriceFeedExists{
24        symbol : String
25    },
26
27    #[error("Insufficient Fees")]
28    InsufficientFees{
29        fees : u128
30        
31    },
32    // Add any other custom errors you like here.
33    // Look at https://docs.rs/thiserror/1.0.21/thiserror/ for details.
34}