diff --git a/server/sandbox_stop.go b/server/sandbox_stop.go index ca7542c241e..a9a16e75b55 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