There was recently - a neutron star that erupted is SGR 1806-20, about 50,000 light years from Earth in the constellation Sagittarius. The light detected from the giant flare was far brighter in gamma rays than visible light or X-rays.
. . . .
"The next biggest flare ever seen from any soft gamma repeater was peanuts compared to this incredible December 27 event, said Dr. Bryan Gaensler of the Harvard-Smithsonian Center for Astrophysics, lead author on the Nature paper. Had this happened within 10 light years of us, it would have severely damaged our atmosphere and possibly have triggered a mass extinction. Fortunately there are no magnetars anywhere near us."