From ccd2b9eb753aba1da9d119f459b704ebc9e74438 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 14 Jan 2021 23:56:53 -0500 Subject: [PATCH] Fixing a stackoverflow error with url searching. --- lemmy_apub/src/fetcher/search.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lemmy_apub/src/fetcher/search.rs b/lemmy_apub/src/fetcher/search.rs index 13187b0a..9f465f76 100644 --- a/lemmy_apub/src/fetcher/search.rs +++ b/lemmy_apub/src/fetcher/search.rs @@ -100,7 +100,9 @@ pub async fn search_by_apub_id( delete_object_locally(&query_url, context).await?; } - build_response(fetch_response?, query_url, recursion_counter, context).await + // Necessary because we get a stack overflow using FetchError + let fet_res = fetch_response.map_err(|e| LemmyError::from(e.inner))?; + build_response(fet_res, query_url, recursion_counter, context).await } async fn build_response( -- 2.44.1