From caed25252d161108be56a0ea01acef235d3f70e6 Mon Sep 17 00:00:00 2001 From: skiffer-git <44203734@qq.com> Date: Fri, 8 Mar 2024 16:03:59 +0800 Subject: [PATCH] Error not handled --- tools/component/component.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/component/component.go b/tools/component/component.go index f5f908fa3..c7c135549 100644 --- a/tools/component/component.go +++ b/tools/component/component.go @@ -104,11 +104,11 @@ func main() { if err != nil { if check.name == "Minio" { if errors.Is(err, errMinioNotEnabled) { - fmt.Println(err.Error()) + fmt.Println(err.Error(), " check ", check.name) checks[index].flag = true } if errors.Is(err, errSignEndPoint) { - fmt.Fprintf(os.Stderr, err.Error()) + fmt.Fprintf(os.Stderr, err.Error(), " check ", check.name) checks[index].flag = true } } @@ -118,7 +118,8 @@ func main() { strings.Contains(errs.Unwrap(err).Error(), "timeout") || strings.Contains(errs.Unwrap(err).Error(), "context deadline exceeded") { component.ErrorPrint(fmt.Sprintf("try check connection %s", check.name)) - continue + allSuccess = false + break } } else { checks[index].flag = true