Cop for it. Don’t try to blame shift. Don’t do it again and show how you intend to not do it again.
I once caused our company to make 40,000 CDs of a game we had just finished. They all had to go in the bin because although I’d tested the installer, tested the software, tested the installed version of the software, I never bothered to test the installer on the CD we were getting replicated. One file had been missed off and that meant the sodding thing never worked. Totally my fault despite the fact I was knackered and, frankly, not totally with it.
Got to bed at 5am after 2 weeks of 20 hour days expecting a few days off, got called at 8:30am to go to work. Arrived, boss gave me a lump hammer. Asked me if, next time I wanted to waste 30 grand, I’d mind going into the car park and smashing up his car rather than making 40,000 coasters and causing us to be late for shipping. I took the blame (despite there being others involved as it was my project) and it was clear that if there was a next time, I’d get fired.
I found the problem, fixed it, tested it properly this time, created a new process for signing off manufacturing releases and went back to bed. Next week, my boss had all 40,000 duff copies sent to my house to dispose of (easier said than done).