From e02afae3590629fbe1d43a9da15c0e6392d3ade0 Mon Sep 17 00:00:00 2001 From: ish Date: Fri, 1 Nov 2024 12:01:45 +0900 Subject: [PATCH] db: Just warning when failed to fetch Swagger YALM URL --- db/taskComponent.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/db/taskComponent.go b/db/taskComponent.go index 0c3072d..f253315 100644 --- a/db/taskComponent.go +++ b/db/taskComponent.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "fmt" + "github.com/jollaman999/utils/logger" "gorm.io/gorm" "io" "net/http" @@ -175,7 +176,8 @@ func TaskComponentInit() error { spec, err := fetchAndParseYAML(connection, configFile.SwaggerYAMLEndpoint) if err != nil { - return fmt.Errorf("failed to fetch and parse swagger spec: %v", err) + logger.Println(logger.WARN, true, fmt.Sprintf("failed to fetch and parse swagger spec: %v", err)) + continue } endpoint := strings.TrimPrefix(configFile.Endpoint, spec.BasePath)