ic_asset/error/
gather_asset_descriptors.rs1use crate::error::fs::CanonicalizePathError;
2use crate::error::get_asset_config::GetAssetConfigError;
3use crate::error::load_config::AssetLoadConfigError;
4use std::path::PathBuf;
5use thiserror::Error;
6
7#[derive(Error, Debug)]
9pub enum GatherAssetDescriptorsError {
10 #[error("Asset with key '{0}' defined at {1} and {2}")]
12 DuplicateAssetKey(String, Box<PathBuf>, Box<PathBuf>),
13
14 #[error("Failed to get asset configuration")]
16 GetAssetConfigFailed(#[from] GetAssetConfigError),
17
18 #[error("invalid directory entry")]
20 InvalidDirectoryEntry(#[source] CanonicalizePathError),
21
22 #[error("invalid source directory")]
24 InvalidSourceDirectory(#[source] CanonicalizePathError),
25
26 #[error("Failed to load asset configuration")]
28 LoadConfigFailed(#[source] AssetLoadConfigError),
29
30 #[error(
32 "This project uses the hardened security policy for some assets, but does not actually configure any custom improvements over the standard policy. To get started, look at 'dfx info security-policy'. It shows the default security policy along with suggestions on how to improve it.\n{0}"
33 )]
34 HardenedSecurityPolicyIsNotHardened(String),
35}