fix the error messages and the index stats

This commit is contained in:
Irevoire 2022-10-21 14:12:25 +02:00 committed by Tamo
parent e495e2ec9d
commit 5bb9023722
2 changed files with 6 additions and 13 deletions

View file

@ -180,7 +180,7 @@ pub async fn get_index_stats(
) -> Result<HttpResponse, ResponseError> {
analytics.publish("Stats Seen".to_string(), json!({ "per_index_uid": true }), Some(&req));
let stats = IndexStats::new((*index_scheduler).clone(), index_uid.into_inner());
let stats = IndexStats::new((*index_scheduler).clone(), index_uid.into_inner())?;
debug!("returns: {:?}", stats);
Ok(HttpResponse::Ok().json(stats))