Move index swap error handling from meilisearch-http to index-scheduler

And make index_not_found error asynchronous, since we can't know
whether the index will exist by the time the index swap task is
processed.

Improve the index-swap test to verify that future tasks are not swapped
and to test the new error messages that were introduced.
This commit is contained in:
Loïc Lecrenier 2022-10-27 09:41:32 +02:00
parent b44cc62320
commit 78ffa00f98
11 changed files with 305 additions and 63 deletions

View file

@ -705,7 +705,7 @@ async fn test_summarized_index_swap() {
]
},
"error": {
"message": "Index `doggos` not found.",
"message": "Indexes `cattos`, `doggos` not found.",
"code": "index_not_found",
"type": "invalid_request",
"link": "https://docs.meilisearch.com/errors#index_not_found"