From 6e44f3143bc015dc53bfebf0c19c8ee6fc6adc2f Mon Sep 17 00:00:00 2001 From: Yang Xiufeng Date: Wed, 4 Dec 2024 20:06:01 +0800 Subject: [PATCH] fix error msg: dup "fail to". --- core/src/client.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/core/src/client.rs b/core/src/client.rs index 26586f18..09f4d84a 100644 --- a/core/src/client.rs +++ b/core/src/client.rs @@ -849,11 +849,7 @@ 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(_) => { @@ -861,7 +857,7 @@ impl APIClient { retries = 0; } else if retries == 2 { return Err(err.with_context(&format!( - "fail to {} {} after 3 reties", + "{} {} after 3 reties", request.method(), request.url() ))); @@ -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() )));