about summary refs log tree commit diff
path: root/ops
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-01-03T14·46+0200
committerclbot <clbot@tvl.fyi>2024-01-03T17·03+0000
commit4a3aa05c8f3efd0f00493d3b625e30965df1a006 (patch)
tree6dc8468df52ce0288aef174fb6783c131346c358 /ops
parentf17b78003559885f6f86a06ff3102566267c1316 (diff)
fix(ops/besadii): error formatting r/7322
Errors can only be wrapped in fmt.Errorf, in these two cases, we want to
print their string representation to stderr.

Change-Id: I65d345daacdd3960428ce82b5fdafceae61c6cc7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10527
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Diffstat (limited to 'ops')
-rw-r--r--ops/besadii/main.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/ops/besadii/main.go b/ops/besadii/main.go
index e97ca1136cc5..809acc29e8b4 100644
--- a/ops/besadii/main.go
+++ b/ops/besadii/main.go
@@ -187,7 +187,7 @@ func updateGerrit(cfg *config, review reviewInput, changeId, patchset string) {
 	url := fmt.Sprintf("%s/a/changes/%s/revisions/%s/review", cfg.GerritUrl, changeId, patchset)
 	req, err := http.NewRequest("POST", url, reader)
 	if err != nil {
-		fmt.Fprintf(os.Stderr, "failed to create an HTTP request: %w", err)
+		fmt.Fprintf(os.Stderr, "failed to create an HTTP request: %s", err)
 		os.Exit(1)
 	}
 
@@ -196,7 +196,7 @@ func updateGerrit(cfg *config, review reviewInput, changeId, patchset string) {
 
 	resp, err := http.DefaultClient.Do(req)
 	if err != nil {
-		fmt.Errorf("failed to update %s on %s: %w", cfg.GerritChangeName, cfg.GerritUrl, err)
+		fmt.Fprintf(os.Stderr, "failed to update %s on %s: %s", cfg.GerritChangeName, cfg.GerritUrl, err)
 	}
 	defer resp.Body.Close()