sugar_cli/upload/
errors.rs

1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum UploadError {
5    #[error("Invalid assets directory: {0}")]
6    InvalidAssetsDirectory(String),
7
8    #[error("Failed to get extension from assets dir")]
9    GetExtensionError,
10
11    #[error("No extension for path")]
12    NoExtension,
13
14    #[error("Invalid number of files {0}, there should be an even number of files")]
15    InvalidNumberOfFiles(usize),
16
17    #[error("{0}")]
18    Incomplete(String),
19
20    #[error("{0}")]
21    SendDataFailed(String),
22
23    #[error(
24        "Mismatch value for \"{0}\" property in file \"{1}\": expected \"{2}\", found \"{3}\""
25    )]
26    MismatchValue(String, String, String, String),
27
28    #[error("Metadata file {0} is not formatted correctly for animations.")]
29    AnimationFileError(String),
30}