mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-24 13:40:31 +01:00
error when deleting unexisting index
This commit is contained in:
parent
32843e9ade
commit
11e00c906f
@ -311,9 +311,11 @@ async fn delete_index(
|
||||
data: web::Data<Data>,
|
||||
path: web::Path<IndexParam>,
|
||||
) -> Result<HttpResponse, ResponseError> {
|
||||
data.db.delete_index(&path.index_uid)?;
|
||||
|
||||
Ok(HttpResponse::NoContent().finish())
|
||||
if data.db.delete_index(&path.index_uid)? {
|
||||
Ok(HttpResponse::NoContent().finish())
|
||||
} else {
|
||||
Err(Error::index_not_found(&path.index_uid).into())
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
|
Loading…
x
Reference in New Issue
Block a user