Skip to main content

platz_chart_ext/
error.rs

1#[derive(Debug, thiserror::Error)]
2pub enum UiSchemaInputError<CollectionError>
3where
4    CollectionError: std::fmt::Display,
5{
6    #[error("An input is missing while being referenced in an output field: {0}")]
7    MissingInputValue(String),
8
9    #[error("An optional input was not provided: {0}")]
10    OptionalInputMissing(String),
11
12    #[error("An output refers to the {0} input, but it doesn't appear in the schema")]
13    MissingInputSchema(String),
14
15    #[error("An output refers to the input field {0}, but that input is not a collection")]
16    InputNotACollection(String),
17
18    #[error("Could not find a collection named {0}: {1}")]
19    InvalidCollectionName(serde_json::Value, serde_json::Error),
20
21    #[error("Could not find a {0} collection item with ID: {1}")]
22    CollectionItemNotFound(String, String),
23
24    #[error("The {0} input field was expected to be a string")]
25    InputNotString(String),
26
27    #[error("The {0} input field was expected to be an array of strings")]
28    InputNotStringArray(String),
29
30    #[error("Input expected to be a UUID: {0}")]
31    InvalidCollectionId(String),
32
33    #[error("Collection not supported for references: {0}")]
34    UnsupportedCollection(String),
35
36    #[error("Unknown property {0} of collection {1}")]
37    UnknownProperty(String, String),
38
39    #[error("Error while resolving collection property: {0}")]
40    CollectionError(#[from] CollectionError),
41}