diff --git a/server/sandbox_stop.go b/server/sandbox_stop.go index cd813c2bbfb..964bdc19138 100644 --- a/server/sandbox_stop.go +++ b/server/sandbox_stop.go @@ -20,7 +20,7 @@ func (s *Server) StopPodSandbox(ctx context.Context, req *types.StopPodSandboxRe return err } if err == errSandboxNotCreated { - return fmt.Errorf("StopPodSandbox failed as the sandbox is not created: %s", sb.ID()) + return fmt.Errorf("StopPodSandbox failed as the sandbox is not created: %s", req.PodSandboxID) } // If the sandbox isn't found we just return an empty response to adhere