1use cosmwasm_std::StdError;
2use cw_utils::ParseReplyError;
3use thiserror::Error;
4
5#[derive(Error, Debug, PartialEq)]
6pub enum ContractError {
7 #[error("{0}")]
8 Std(#[from] StdError),
9
10 #[error(transparent)]
11 ParseReplyError(#[from] ParseReplyError),
12
13 #[error("Unauthorized")]
14 Unauthorized {},
15
16 #[error("Unknown contract name")]
17 UnknownContract {},
18
19 #[error("Unknown contract method")]
20 UnknownMethod {},
21
22 #[error("Can't remove latest version")]
23 LatestVersionRemove {},
24
25 #[error("Can't deploy this version, it already exists")]
26 VersionExists {},
27
28 #[error("Can't remove contract unless it's paused or library")]
29 NotPaused {},
30
31 #[error("Provided URL has exceeded the maximum allowable length")]
32 UrlExceededMaxLength {},
33
34 #[error("Must not nominate current owner")]
35 SameOwnerNominated {},
36}