mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-23 10:37:41 +08:00
Merge #3019
3019: Fix error code of the "duplicate index found" error on the index swap route r=irevoire a=loiclec According to the spec, the code of the error should be `duplicate_index_found`, but it was `bad_request` instead. Co-authored-by: Loïc Lecrenier <loic.lecrenier@me.com>
This commit is contained in:
commit
722a0da0c3
@ -69,8 +69,8 @@ impl ErrorCode for Error {
|
||||
Error::IndexNotFound(_) => Code::IndexNotFound,
|
||||
Error::IndexesNotFound(_) => Code::IndexNotFound,
|
||||
Error::IndexAlreadyExists(_) => Code::IndexAlreadyExists,
|
||||
Error::SwapDuplicateIndexesFound(_) => Code::BadRequest,
|
||||
Error::SwapDuplicateIndexFound(_) => Code::BadRequest,
|
||||
Error::SwapDuplicateIndexesFound(_) => Code::DuplicateIndexFound,
|
||||
Error::SwapDuplicateIndexFound(_) => Code::DuplicateIndexFound,
|
||||
Error::TaskNotFound(_) => Code::TaskNotFound,
|
||||
Error::TaskDeletionWithEmptyQuery => Code::TaskDeletionWithEmptyQuery,
|
||||
Error::TaskCancelationWithEmptyQuery => Code::TaskCancelationWithEmptyQuery,
|
||||
|
Loading…
Reference in New Issue
Block a user