2026-01-06 16:19:15 -05:00
|
|
|
use crate::{
|
2026-01-14 12:03:40 -05:00
|
|
|
document::field::{Field, FieldType},
|
2026-01-06 16:19:15 -05:00
|
|
|
name::Name,
|
|
|
|
|
};
|
2025-12-24 17:54:25 -05:00
|
|
|
use isolang::Language;
|
|
|
|
|
use uuid::Uuid;
|
|
|
|
|
|
|
|
|
|
#[derive(Clone, Debug)]
|
|
|
|
|
pub enum MTTError {
|
|
|
|
|
AdditionMissingField(Name),
|
|
|
|
|
CannotConvertMessageToRouteID,
|
|
|
|
|
DocumentAlreadyExists(String),
|
|
|
|
|
DocumentFieldAlreadyExists(String, Field),
|
|
|
|
|
DocumentFieldMissing(String),
|
|
|
|
|
DocumentFieldNotFound(String),
|
|
|
|
|
DocumentFieldWrongDataType(FieldType, FieldType),
|
|
|
|
|
DocumentNotFound(String),
|
|
|
|
|
FieldDuplicate,
|
|
|
|
|
FieldInvalidType,
|
|
|
|
|
FieldMissingData,
|
|
|
|
|
InvalidNone,
|
|
|
|
|
RecordMismatch,
|
|
|
|
|
NameDuplicate(Name),
|
|
|
|
|
NameInvalidID(Uuid),
|
|
|
|
|
NameMissingTranslation(Language),
|
2025-12-26 13:02:15 -05:00
|
|
|
NameNotUniquePerLanguage(Name),
|
2025-12-24 17:54:25 -05:00
|
|
|
NameNotFound(Name),
|
|
|
|
|
QueryCannotChangeData,
|
|
|
|
|
RouteRequiresDocumentID,
|
|
|
|
|
}
|