mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-25 23:43:18 +00:00
Use from_message for static error string
This commit is contained in:
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…
Reference in a new issue