Skip to content

Commit 16f3d67

Browse files
committed
add current process state to the error message
It will aid debugging if a procees delete fails, to figure out whether it is paused or running. Signed-off-by: Alakesh Haloi <[email protected]>
1 parent 03d1a0f commit 16f3d67

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

process.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ func (p *process) Delete(ctx context.Context, opts ...ProcessDeleteOpts) (*ExitS
210210
}
211211
switch status.Status {
212212
case Running, Paused, Pausing:
213-
return nil, errors.Wrapf(errdefs.ErrFailedPrecondition, "process must be stopped before deletion")
213+
return nil, errors.Wrapf(errdefs.ErrFailedPrecondition, "current process state: %s, process must be stopped before deletion", status.Status)
214214
}
215215
r, err := p.task.client.TaskService().DeleteProcess(ctx, &tasks.DeleteProcessRequest{
216216
ContainerID: p.task.id,

0 commit comments

Comments
 (0)