mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-26 00:01:00 +00:00
fix the invalid index uid errors
This commit is contained in:
committed by
Clément Renault
parent
99144b1419
commit
cb48a02f94
@ -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
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user