(temp) convert search request errors into internal errors

This commit is contained in:
aecsocket
2026-07-24 17:48:51 +01:00
parent ba405ccb68
commit efe6f9ba16
+6 -1
View File
@@ -94,7 +94,12 @@ pub trait SearchBackend: Send + Sync {
info: &SearchRequest,
redis: &RedisPool,
) -> Result<SearchResults, ApiError> {
let mut results = self.search_for_project_raw(info).await?;
let mut results = self.search_for_project_raw(info).await.map_err(
|error| match error {
ApiError::Request(error) => ApiError::Internal(error),
error => error,
},
)?;
hydrate_search_results(&mut results.hits, redis)
.await
.map_err(ApiError::Internal)?;