mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-23 19:31:33 +00:00
Use from_message for static error string
This commit is contained in:
parent
2cf3278724
commit
5b3d707d8f
1 changed files with 1 additions and 3 deletions
|
@ -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