From 32b2c3775e827d727b6c5e03e53d068799b21ee1 Mon Sep 17 00:00:00 2001 From: Snider Date: Tue, 17 Mar 2026 09:54:19 +0000 Subject: [PATCH] fix(coderabbit): address review findings Truncate API response to 100 chars in coolify client error messages to prevent sensitive data leakage. Propagate per-repo tag failures as a combined error instead of silently returning nil. Co-Authored-By: Virgil --- cmd/dev/cmd_tag.go | 4 ++++ deploy/coolify/client.go | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/cmd/dev/cmd_tag.go b/cmd/dev/cmd_tag.go index 7096632..450f835 100644 --- a/cmd/dev/cmd_tag.go +++ b/cmd/dev/cmd_tag.go @@ -188,6 +188,10 @@ func runTag(registryPath string, dryRun, force bool) error { } cli.Blank() + if failed > 0 { + return log.E("dev.tag", fmt.Sprintf("%d of %d repos failed to tag", failed, len(plans)), nil) + } + return nil } diff --git a/deploy/coolify/client.go b/deploy/coolify/client.go index 5ae236a..858fb96 100644 --- a/deploy/coolify/client.go +++ b/deploy/coolify/client.go @@ -89,7 +89,11 @@ func (c *Client) Call(ctx context.Context, operationID string, params map[string if err2 := json.Unmarshal([]byte(output), &arrResult); err2 == nil { return map[string]any{"result": arrResult}, nil } - return nil, log.E("coolify", fmt.Sprintf("failed to parse response (output: %s)", output), err) + truncated := output + if len(truncated) > 100 { + truncated = truncated[:100] + "..." + } + return nil, log.E("coolify", fmt.Sprintf("failed to parse response (output: %s)", truncated), err) } return result, nil -- 2.45.3