mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 03:47:02 +02:00
fix the error code of the swap index route
This commit is contained in:
parent
3c630891bb
commit
e706628bb1
5 changed files with 24 additions and 13 deletions
|
@ -882,11 +882,11 @@ impl IndexScheduler {
|
|||
}
|
||||
if !not_found_indexes.is_empty() {
|
||||
if not_found_indexes.len() == 1 {
|
||||
return Err(Error::IndexNotFound(
|
||||
return Err(Error::SwapIndexNotFound(
|
||||
not_found_indexes.into_iter().next().unwrap().clone(),
|
||||
));
|
||||
} else {
|
||||
return Err(Error::IndexesNotFound(
|
||||
return Err(Error::SwapIndexesNotFound(
|
||||
not_found_indexes.into_iter().cloned().collect(),
|
||||
));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue