From efe6f9ba164a659648ae0843b4548ed601be035e Mon Sep 17 00:00:00 2001 From: aecsocket <43144841+aecsocket@users.noreply.github.com> Date: Fri, 24 Jul 2026 17:48:51 +0100 Subject: [PATCH] (temp) convert search request errors into internal errors --- apps/labrinth/src/search/mod.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/labrinth/src/search/mod.rs b/apps/labrinth/src/search/mod.rs index f98f9f4cb1..1a8ee84705 100644 --- a/apps/labrinth/src/search/mod.rs +++ b/apps/labrinth/src/search/mod.rs @@ -94,7 +94,12 @@ pub trait SearchBackend: Send + Sync { info: &SearchRequest, redis: &RedisPool, ) -> Result { - 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)?;