From 77540fb9726492d1e11f5d111292f1e3a12cefdc Mon Sep 17 00:00:00 2001 From: Dery Rahman Ahaddienata Date: Mon, 30 Dec 2024 18:17:12 +0700 Subject: [PATCH] fix: return err directly when query build is failed (#57) --- mc2mc/mc2mc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mc2mc/mc2mc.go b/mc2mc/mc2mc.go index e451c90..9599d80 100644 --- a/mc2mc/mc2mc.go +++ b/mc2mc/mc2mc.go @@ -115,7 +115,7 @@ func mc2mc(envs []string) error { query.WithOverridedValue("_partitiondate", fmt.Sprintf("DATE(TIMESTAMP('%s'))", dates[i])), ).Build() if err != nil { - break + return errors.WithStack(err) } queriesToExecute = append(queriesToExecute, queryToExecute) }