Skip to content

Commit

Permalink
fix error msg: dup "fail to".
Browse files Browse the repository at this point in the history
  • Loading branch information
youngsofun committed Dec 4, 2024
1 parent 9c29596 commit 6e44f31
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions core/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -849,19 +849,15 @@ impl APIClient {
),
};
if !retry {
return Err(err.with_context(&format!(
"fail to {} {} after 3 reties",
request.method(),
request.url()
)));
return Err(err.with_context(&format!("{} {}", request.method(), request.url())));
}
match &err {
Error::AuthFailure(_) => {
if refreshed {
retries = 0;
} else if retries == 2 {
return Err(err.with_context(&format!(
"fail to {} {} after 3 reties",
"{} {} after 3 reties",
request.method(),
request.url()
)));
Expand All @@ -870,7 +866,7 @@ impl APIClient {
_ => {
if retries == 2 {
return Err(err.with_context(&format!(
"fail to {} {} after 3 reties",
"{} {} after 3 reties",
request.method(),
request.url()
)));
Expand Down

0 comments on commit 6e44f31

Please sign in to comment.