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
30
31
32
33
34
35
36
37
38
39
40
41
#[derive(Debug, thiserror::Error)]
pub enum UiSchemaInputError<CollectionError>
where
    CollectionError: std::fmt::Display,
{
    #[error("An input is missing while being referenced in an output field: {0}")]
    MissingInputValue(String),

    #[error("An optional input was not provided: {0}")]
    OptionalInputMissing(String),

    #[error("An output refers to the {0} input, but it doesn't appear in the schema")]
    MissingInputSchema(String),

    #[error("An output refers to the input field {0}, but that input is not a collection")]
    InputNotACollection(String),

    #[error("Could not find a collection named {0}: {1}")]
    InvalidCollectionName(serde_json::Value, serde_json::Error),

    #[error("Could not find a {0} collection item with ID: {1}")]
    CollectionItemNotFound(String, String),

    #[error("The {0} input field was expected to be a string")]
    InputNotString(String),

    #[error("The {0} input field was expected to be an array of strings")]
    InputNotStringArray(String),

    #[error("Input expected to be a UUID: {0}")]
    InvalidCollectionId(String),

    #[error("Collection not supported for references: {0}")]
    UnsupportedCollection(String),

    #[error("Unknown property {0} of collection {1}")]
    UnknownProperty(String, String),

    #[error("Error while resolving collection property: {0}")]
    CollectionError(#[from] CollectionError),
}