Fix delete error code on the containerd daemon side.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2019-10-09 00:28:51 -07:00
parent 772aaf127a
commit ffcb1cc9be
3 changed files with 20 additions and 8 deletions

View File

@@ -241,7 +241,7 @@ func (l *local) Delete(ctx context.Context, r *api.DeleteTaskRequest, _ ...grpc.
}
exit, err := t.Delete(ctx)
if err != nil {
return nil, err
return nil, errdefs.ToGRPC(err)
}
return &api.DeleteResponse{
ExitStatus: exit.Status,
@@ -257,7 +257,7 @@ func (l *local) DeleteProcess(ctx context.Context, r *api.DeleteProcessRequest,
}
process, err := t.Process(ctx, r.ExecID)
if err != nil {
return nil, err
return nil, errdefs.ToGRPC(err)
}
exit, err := process.Delete(ctx)
if err != nil {