Include error message in pull warning/errors

Signed-off-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Felix Fontein 2024-02-27 20:49:29 +01:00 committed by Nicolas De loof
parent 3371227794
commit 2e85b3c265

View File

@ -200,18 +200,20 @@ func (s *composeService) pullServiceImage(ctx context.Context, service types.Ser
// then the status should be warning instead of error // then the status should be warning instead of error
if err != nil && service.Build != nil { if err != nil && service.Build != nil {
w.Event(progress.Event{ w.Event(progress.Event{
ID: service.Name, ID: service.Name,
Status: progress.Warning, Status: progress.Warning,
Text: "Warning", Text: "Warning",
StatusText: err.Error(),
}) })
return "", WrapCategorisedComposeError(err, PullFailure) return "", WrapCategorisedComposeError(err, PullFailure)
} }
if err != nil { if err != nil {
w.Event(progress.Event{ w.Event(progress.Event{
ID: service.Name, ID: service.Name,
Status: progress.Error, Status: progress.Error,
Text: "Error", Text: "Error",
StatusText: err.Error(),
}) })
return "", WrapCategorisedComposeError(err, PullFailure) return "", WrapCategorisedComposeError(err, PullFailure)
} }