mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-27 00:31:02 +00:00
review the internal schema to allow to create schema without identifier; fix #513
This commit is contained in:
@ -6,6 +6,7 @@ pub type SResult<T> = Result<T, Error>;
|
||||
#[derive(Debug)]
|
||||
pub enum Error {
|
||||
FieldNameNotFound(String),
|
||||
IdentifierAlreadyPresent,
|
||||
MaxFieldsLimitExceeded,
|
||||
}
|
||||
|
||||
@ -14,6 +15,7 @@ impl fmt::Display for Error {
|
||||
use self::Error::*;
|
||||
match self {
|
||||
FieldNameNotFound(field) => write!(f, "The field {:?} doesn't exist", field),
|
||||
IdentifierAlreadyPresent => write!(f, "The schema already have an identifier. It's impossible to update it"),
|
||||
MaxFieldsLimitExceeded => write!(f, "The maximum of possible reattributed field id has been reached"),
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user