diff --git a/crates/store/src/backend/elastic/mod.rs b/crates/store/src/backend/elastic/mod.rs index 86dcdc46..382d0fe1 100644 --- a/crates/store/src/backend/elastic/mod.rs +++ b/crates/store/src/backend/elastic/mod.rs @@ -103,17 +103,19 @@ impl ElasticSearchStore { } }; - es.create_index( - config - .property_or_default((&prefix, "index.shards"), "3") - .unwrap_or(3), - config - .property_or_default((&prefix, "index.replicas"), "0") - .unwrap_or(0), - ) - .await - .map_err(|err| config.new_build_error(prefix.as_str(), err.to_string())) - .ok()?; + if let Err(err) = es + .create_index( + config + .property_or_default((&prefix, "index.shards"), "3") + .unwrap_or(3), + config + .property_or_default((&prefix, "index.replicas"), "0") + .unwrap_or(0), + ) + .await + { + config.new_build_error(prefix.as_str(), err.to_string()); + } Some(es) }