Use from_message for static error string

asonix/reqwest-middleware
Aode (lion) 3 years ago
parent 2cf3278724
commit 5b3d707d8f

@ -84,9 +84,7 @@ where
*request_counter += 1;
if *request_counter > context.settings().http_fetch_retry_limit {
return Err(LemmyError::from(anyhow::anyhow!(
"Request retry limit reached"
)));
return Err(LemmyError::from_message("Request retry limit reached"));
}
let response = retry(|| context.client().get(&fetch_url).send()).await?;

Loading…
Cancel
Save