fix(ops/besadii): error formatting
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
This commit is contained in:
parent
f17b780035
commit
4a3aa05c8f
1 changed files with 2 additions and 2 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in a new issue