diff --git a/module/gitea/main.go b/module/gitea/main.go index 87ee0d8..37df8a2 100644 --- a/module/gitea/main.go +++ b/module/gitea/main.go @@ -116,26 +116,26 @@ func (m *Module) homepage(rw http.ResponseWriter, req *http.Request, state *util selRepo = q.Get("repo") repo, _, err := giteaClient.GetRepo(myOrg, selRepo) if err != nil { - http.Error(rw, err.Error(), http.StatusInternalServerError) + http.Error(rw, "GetRepo: "+err.Error(), http.StatusInternalServerError) return } refs, _, err := giteaClient.GetRepoRefs(myOrg, selRepo, "heads/"+repo.DefaultBranch) if err != nil { - http.Error(rw, err.Error(), http.StatusInternalServerError) + http.Error(rw, "GetRepoRefs: "+err.Error(), http.StatusInternalServerError) return } if len(refs) == 1 { ref := refs[0] commit, _, err := giteaClient.GetSingleCommit(myOrg, selRepo, ref.Object.SHA) if err != nil { - http.Error(rw, err.Error(), http.StatusInternalServerError) + http.Error(rw, "GetSingleCommit: "+err.Error(), http.StatusInternalServerError) return } selCommitTime = commit.CommitMeta.Created.UTC().Format("20060102150405") selCommitHash = commit.CommitMeta.SHA[:12] goMod, _, err := giteaClient.GetFile(myOrg, selRepo, ref.Object.SHA, "go.mod") if err != nil { - http.Error(rw, err.Error(), http.StatusInternalServerError) + http.Error(rw, "go.mod: "+err.Error(), http.StatusInternalServerError) return } goModStr := string(goMod)