Skip to content

Commit aefcfcc

Browse files
Wrap errors when running Bind plugins
Signed-off-by: Aldo Culquicondor <[email protected]> Change-Id: I29f8d3ea219a5cf667cf718545e8dfff971ca6ec
1 parent a482d7e commit aefcfcc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/scheduler/framework/runtime/framework.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -743,9 +743,9 @@ func (f *frameworkImpl) RunBindPlugins(ctx context.Context, state *framework.Cyc
743743
continue
744744
}
745745
if !status.IsSuccess() {
746-
msg := fmt.Sprintf("plugin %q failed to bind pod \"%v/%v\": %v", bp.Name(), pod.Namespace, pod.Name, status.Message())
747-
klog.Error(msg)
748-
return framework.NewStatus(framework.Error, msg)
746+
err := fmt.Errorf("plugin %q failed to bind pod \"%v/%v\": %w", bp.Name(), pod.Namespace, pod.Name, status.AsError())
747+
klog.Error(err)
748+
return framework.AsStatus(err)
749749
}
750750
return status
751751
}

0 commit comments

Comments
 (0)