mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 12:27:13 +02:00
Fix a few index swap bugs.
1. Details of the indexSwap task 2. Query tasks with type=indexUid 3. Synchronous error message for multiple index not found
This commit is contained in:
parent
a16604af80
commit
1f75caae88
13 changed files with 75 additions and 35 deletions
|
@ -38,6 +38,10 @@ pub enum MeilisearchHttpError {
|
|||
.0.iter().map(|s| format!("`{}`", s)).collect::<Vec<_>>().join(", ")
|
||||
)]
|
||||
SwapDuplicateIndexesFound(Vec<String>),
|
||||
#[error("Two indexes must be given for each swap. The list `{:?}` contains {} indexes.",
|
||||
.0, .0.len()
|
||||
)]
|
||||
SwapIndexPayloadWrongLength(Vec<String>),
|
||||
#[error(transparent)]
|
||||
IndexUid(#[from] IndexUidFormatError),
|
||||
#[error(transparent)]
|
||||
|
@ -70,6 +74,7 @@ impl ErrorCode for MeilisearchHttpError {
|
|||
MeilisearchHttpError::IndexesNotFound(_) => Code::IndexNotFound,
|
||||
MeilisearchHttpError::SwapDuplicateIndexFound(_) => Code::DuplicateIndexFound,
|
||||
MeilisearchHttpError::SwapDuplicateIndexesFound(_) => Code::DuplicateIndexFound,
|
||||
MeilisearchHttpError::SwapIndexPayloadWrongLength(_) => Code::BadRequest,
|
||||
MeilisearchHttpError::IndexUid(e) => e.error_code(),
|
||||
MeilisearchHttpError::SerdeJson(_) => Code::Internal,
|
||||
MeilisearchHttpError::HeedError(_) => Code::Internal,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue