mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 12:27:13 +02:00
fix the invalid index uid errors
This commit is contained in:
parent
621dbb8159
commit
d507e6ddac
3 changed files with 16 additions and 0 deletions
|
@ -4,6 +4,8 @@ use std::str::FromStr;
|
|||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::error::{Code, ErrorCode};
|
||||
|
||||
/// An index uid is composed of only ascii alphanumeric characters, - and _, between 1 and 400
|
||||
/// bytes long
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
|
||||
|
@ -82,3 +84,9 @@ impl fmt::Display for IndexUidFormatError {
|
|||
}
|
||||
|
||||
impl Error for IndexUidFormatError {}
|
||||
|
||||
impl ErrorCode for IndexUidFormatError {
|
||||
fn error_code(&self) -> Code {
|
||||
Code::InvalidIndexUid
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue