From e51704c09a900deafdbba7f651183559601e6ebe Mon Sep 17 00:00:00 2001 From: Charlotte Vermandel Date: Wed, 13 Nov 2019 14:17:31 +0100 Subject: [PATCH] Remove the error catching on the index creation route when the index already exist --- meilidb-http/src/routes/index.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/meilidb-http/src/routes/index.rs b/meilidb-http/src/routes/index.rs index 92c5dfa57..a6367046d 100644 --- a/meilidb-http/src/routes/index.rs +++ b/meilidb-http/src/routes/index.rs @@ -66,9 +66,6 @@ pub async fn create_index(mut ctx: Context) -> SResult { let created_index = match db.create_index(&index_name) { Ok(index) => index, - Err(meilidb_core::Error::IndexAlreadyExists) => db.open_index(&index_name).ok_or( - ResponseError::internal("index not found but must have been found"), - )?, Err(e) => return Err(ResponseError::create_index(e)), };