Merge pull request #35959 from dnephin/remove-str-error-checking
Use errdefs instead of string contains for checking not found Upstream-commit: 7f6fdce901d51e2692f7d5229d7ba8b4bad6c6a9 Component: engine
This commit is contained in:
@ -147,7 +147,7 @@ func (c *client) Restore(ctx context.Context, id string, attachStdio StdioCallba
|
||||
rio, err = attachStdio(io)
|
||||
return rio, err
|
||||
})
|
||||
if err != nil && !strings.Contains(err.Error(), "no running task found") {
|
||||
if err != nil && !errdefs.IsNotFound(errors.Cause(err)) {
|
||||
return false, -1, err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user