Log the exact error in case of 'error setting commit status'

This commit is contained in:
Elena Grahovac 2017-12-20 12:12:38 +01:00
parent af273e8918
commit 296a4f1977
3 changed files with 4 additions and 4 deletions

View file

@ -301,7 +301,7 @@ func PostApproval(c *gin.Context) {
uri := fmt.Sprintf("%s/%s/%d", httputil.GetURL(c.Request), repo.FullName, build.Number)
err = remote_.Status(user, repo, build, uri)
if err != nil {
logrus.Errorf("error setting commit status for %s/%d", repo.FullName, build.Number)
logrus.Errorf("error setting commit status for %s/%d: %v", repo.FullName, build.Number, err)
}
}()
@ -427,7 +427,7 @@ func PostDecline(c *gin.Context) {
uri := fmt.Sprintf("%s/%s/%d", httputil.GetURL(c.Request), repo.FullName, build.Number)
err = remote_.Status(user, repo, build, uri)
if err != nil {
logrus.Errorf("error setting commit status for %s/%d", repo.FullName, build.Number)
logrus.Errorf("error setting commit status for %s/%d: %v", repo.FullName, build.Number, err)
}
c.JSON(200, build)

View file

@ -247,7 +247,7 @@ func PostHook(c *gin.Context) {
uri := fmt.Sprintf("%s/%s/%d", httputil.GetURL(c.Request), repo.FullName, build.Number)
err = remote_.Status(user, repo, build, uri)
if err != nil {
logrus.Errorf("error setting commit status for %s/%d", repo.FullName, build.Number)
logrus.Errorf("error setting commit status for %s/%d: %v", repo.FullName, build.Number, err)
}
}()

View file

@ -428,7 +428,7 @@ func (s *RPC) Done(c context.Context, id string, state rpc.State) error {
uri := fmt.Sprintf("%s/%s/%d", s.host, repo.FullName, build.Number)
err = s.remote.Status(user, repo, build, uri)
if err != nil {
logrus.Errorf("error setting commit status for %s/%d", repo.FullName, build.Number)
logrus.Errorf("error setting commit status for %s/%d: %v", repo.FullName, build.Number, err)
}
}
}