Its headed back to the factory. I have other shotguns of much higher quality sitting in the safe but i really liked how light and handy this one was - and it basically lives in the gun rack on my SxS so I knew it was gonna get beat up. It was doing a bang up job (pun intended) right until it went BANG the wrong way.
To my knowledge, if it happens regularly, it's the gun. If it is a 1 off thing, it's likely the ammo.
In this case, I'd guess it was the ammo. I've heard mostly good things about Tristar shotguns. If the primer was loaded too high it can cause it to go off prematurely. Definitely have the gun checked out though.
The operative words are "out of battery". I had that happen with an 1187 when steel was first mandated in the 80's. Using Active 3" steel. It was my fault. I was being quite and closed the action slowly not giving a palm bump to ensure lock up. When the birds came to blocks it was exciting, especially for my hunting partner and his dog who were to my right.
You didn't mention whether this was your first shot, second or third. Has the gun ever failed to go into battery before? Is it clean? I wouldn't write it off with one failure until you have eliminated potential issues.
One more point, don't dismiss TriStar or other Turkish made weapons as "junk". That argument held water
a decade ago. Most factories are now using CAD machining for the manufacturing process and the fit and finish is much improved. Your still buying a "value" weapon in most cases so you should expect lesser wood figure, more plastic, triggers that suck, etc. But they should function. Shiite, I love Benelli's, and they are sure proud of their products when it comes to pricing; I have 3, two super 90's and an SBE, all needed springs changed because of lack of going into battery.