The president was attending the White House Correspondents’ Association dinner when a security incident erupted.