Skip to content

Commit

Permalink
Merge pull request #243 from alicerum/bug-1977414
Browse files Browse the repository at this point in the history
Bug 1977414: return correct reason and message from failed build
  • Loading branch information
openshift-merge-robot committed Sep 1, 2021
2 parents 2bc3803 + 225135d commit 272f995
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -252,7 +252,7 @@ func (h *binaryInstantiateHandler) handle(r io.Reader) (runtime.Object, error) {
case latest.Status.Phase == buildv1.BuildPhaseFailed:
// don't cancel the build if it reached a terminal state on its own
cancel = false
errLog := fmt.Sprintf("build %s failed: %s: %s", build.Name, build.Status.Reason, build.Status.Message)
errLog := fmt.Sprintf("build %s failed: %s: %s", build.Name, latest.Status.Reason, latest.Status.Message)
klog.Warningf(errLog)
return nil, errors.NewBadRequest(errLog)
case latest.Status.Phase == buildv1.BuildPhaseCancelled:
Expand Down

0 comments on commit 272f995

Please sign in to comment.