From 78ee2d8432521ae34c6a347a0e94601b5b3d8756 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Sat, 30 Sep 2023 01:00:13 +0300 Subject: [PATCH] update Signed-off-by: Vasiliy Tolstov --- cmd/pkgdashcli/main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/pkgdashcli/main.go b/cmd/pkgdashcli/main.go index f9c062f..5e06327 100644 --- a/cmd/pkgdashcli/main.go +++ b/cmd/pkgdashcli/main.go @@ -5,6 +5,7 @@ import ( "context" "encoding/json" "fmt" + "io" "net/http" "os" "path/filepath" @@ -256,7 +257,8 @@ func giteaPullRequest(ctx context.Context, cfg *Config, mods map[string]modules. return err } if rsp.StatusCode != http.StatusOK { - return fmt.Errorf("unknown error") + buf, _ = io.ReadAll(rsp.Body) + return fmt.Errorf("unknown error: %s", buf) } }