From: Dessalines Date: Fri, 15 Jan 2021 04:56:53 +0000 (-0500) Subject: Fixing a stackoverflow error with url searching. X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/%22https:/hacktivis.me/%7BinboxRss%7D?a=commitdiff_plain;h=ccd2b9eb753aba1da9d119f459b704ebc9e74438;p=lemmy.git Fixing a stackoverflow error with url searching. --- 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(