kanidm/src/lib/error.rs

25 lines
546 B
Rust
Raw Normal View History

2018-11-13 08:14:26 +01:00
#[derive(Debug, PartialEq)]
pub enum SchemaError {
2018-11-20 07:51:10 +01:00
NotImplemented,
InvalidClass,
2018-11-13 08:14:26 +01:00
// FIXME: Is there a way to say what we are missing on error?
// Yes, add a string on the enum.
2019-01-22 02:39:56 +01:00
MissingMustAttribute(String),
2018-11-20 07:51:10 +01:00
InvalidAttribute,
InvalidAttributeSyntax,
EmptyFilter,
Corrupted,
2018-11-13 08:14:26 +01:00
}
2018-11-26 07:13:22 +01:00
#[derive(Serialize, Deserialize, Debug, PartialEq)]
pub enum OperationError {
EmptyRequest,
Backend,
2019-01-28 04:54:17 +01:00
NoMatchingEntries,
2018-11-26 07:13:22 +01:00
SchemaViolation,
Plugin,
2019-01-20 01:23:53 +01:00
FilterGeneration,
2019-01-22 02:39:56 +01:00
InvalidDBState,
InvalidRequestState,
2018-11-26 07:13:22 +01:00
}