1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
use std::num::ParseIntError;
use miette::Diagnostic;
use thiserror::Error;
#[derive(Debug, Diagnostic, Error)]
pub enum MetadataError {
#[error("invalid memory value `{0}`")]
#[diagnostic()]
InvalidMemory(i32),
#[error("invalid lambda metadata in Cargo.toml file: {0}")]
#[diagnostic()]
InvalidCargoMetadata(#[from] serde_json::Error),
#[error("invalid timeout value")]
#[diagnostic()]
InvalidTimeout(#[from] ParseIntError),
#[error("invalid tracing option `{0}`")]
#[diagnostic()]
InvalidTracing(String),
#[error("there are more than one package in the project, you must specify a function name")]
#[diagnostic()]
MultiplePackagesInProject,
#[error("there are no packages in this project")]
#[diagnostic()]
MissingPackageInProject,
#[error("invalid environment variable `{0}`")]
#[diagnostic()]
InvalidEnvVar(String),
}