@@ -169,6 +169,14 @@ func imageAlreadyPresent(serviceImage string, localImages map[string]string) boo
169
169
return ok && tagged .Tag () != "latest"
170
170
}
171
171
172
+ func getUnwrappedErrorMessage (err error ) string {
173
+ derr := errors .Unwrap (err )
174
+ if derr != nil {
175
+ return getUnwrappedErrorMessage (derr )
176
+ }
177
+ return err .Error ()
178
+ }
179
+
172
180
func (s * composeService ) pullServiceImage (ctx context.Context , service types.ServiceConfig ,
173
181
configFile driver.Auth , w progress.Writer , quietPull bool , defaultPlatform string ) (string , error ) {
174
182
w .Event (progress.Event {
@@ -203,7 +211,7 @@ func (s *composeService) pullServiceImage(ctx context.Context, service types.Ser
203
211
ID : service .Name ,
204
212
Status : progress .Warning ,
205
213
Text : "Warning" ,
206
- StatusText : err . Error ( ),
214
+ StatusText : getUnwrappedErrorMessage ( err ),
207
215
})
208
216
return "" , WrapCategorisedComposeError (err , PullFailure )
209
217
}
@@ -213,7 +221,7 @@ func (s *composeService) pullServiceImage(ctx context.Context, service types.Ser
213
221
ID : service .Name ,
214
222
Status : progress .Error ,
215
223
Text : "Error" ,
216
- StatusText : err . Error ( ),
224
+ StatusText : getUnwrappedErrorMessage ( err ),
217
225
})
218
226
return "" , WrapCategorisedComposeError (err , PullFailure )
219
227
}
0 commit comments