diff --git a/pkg/coach-client/client_us.go b/pkg/coach-client/client_us.go index d6918b9..f36e210 100644 --- a/pkg/coach-client/client_us.go +++ b/pkg/coach-client/client_us.go @@ -38,13 +38,14 @@ func tryRequest(ctx context.Context, urlPath string, respData any, proxyGetter f } resp, err := callByProxy(ctx, p, urlPath, respData) - if resp.StatusCode() != 200 { - err = fmt.Errorf("请求错误:%d, %s", resp.StatusCode(), resp.Body()) - } if err != nil { slog.Debug(err.Error()) continue } + if resp.StatusCode() != 200 { + slog.Debug(fmt.Errorf("请求错误:%d, %s", resp.StatusCode(), resp.Body()).Error()) + continue + } return nil } return errors.New("未获取到可用的代理")