]> Untitled Git - lemmy.git/commitdiff
Fixing a stackoverflow error with url searching.
authorDessalines <tyhou13@gmx.com>
Fri, 15 Jan 2021 04:56:53 +0000 (23:56 -0500)
committerDessalines <tyhou13@gmx.com>
Fri, 15 Jan 2021 04:56:53 +0000 (23:56 -0500)
lemmy_apub/src/fetcher/search.rs

index 13187b0a5a1101de28f51c402fa1d58aeca23521..9f465f76851b14d820d1282e68b1fd0eb90b664d 100644 (file)
@@ -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(