From 1dad5a543323a1fe10d7e36e5837f4e1902589c3 Mon Sep 17 00:00:00 2001 From: zhangyangyu Date: Tue, 24 Sep 2024 14:58:43 +0800 Subject: [PATCH] branch create timeout should be an error --- internal/cli/serverless/branch/create.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/cli/serverless/branch/create.go b/internal/cli/serverless/branch/create.go index a584e4dc..9ce61332 100644 --- a/internal/cli/serverless/branch/create.go +++ b/internal/cli/serverless/branch/create.go @@ -253,7 +253,7 @@ func CreateAndSpinnerWait(ctx context.Context, h *internal.Helper, d cloud.TiDBC for { select { case <-timer: - return ui.Result(fmt.Sprintf("Timeout waiting for branch %s to be ready, please check status on dashboard.", newBranchID)) + return errors.New(fmt.Sprintf("Timeout waiting for branch %s to be ready, please check status on dashboard.", newBranchID)) case <-ticker.C: b, err := d.GetBranch(ctx, clusterId, newBranchID) if err != nil {