saya_types/contract/
error.rs1use thiserror::Error;
2
3#[derive(Debug, Clone, PartialEq, Eq, Error)]
4#[non_exhaustive]
5pub enum ContractError {
6 #[error("profile identity is not a valid opaque identifier")]
7 InvalidProfileIdentity,
8
9 #[error("claim id is not a valid identifier")]
10 InvalidClaimId,
11
12 #[error("database object name must not be empty")]
13 EmptyName,
14
15 #[error("database object name is too long")]
16 NameTooLong,
17
18 #[error("value contains control characters")]
19 ControlCharacter,
20
21 #[error("claim text must not be empty")]
22 EmptyText,
23
24 #[error("claim text is too long")]
25 TextTooLong,
26
27 #[error("too many referenced columns")]
28 TooManyColumns,
29
30 #[error("relationship column lists must have equal length")]
31 ColumnCountMismatch,
32
33 #[error("relationship must reference at least one column")]
34 EmptyColumns,
35
36 #[error("schema fingerprint digest is malformed")]
37 InvalidFingerprint,
38
39 #[error("preference requires a {0} scope")]
43 ScopeMismatch(&'static str),
44
45 #[error("timezone is not a well-shaped IANA name")]
46 InvalidTimezone,
47
48 #[error("profile name is not valid")]
49 InvalidProfileName,
50}