There were no winners in that situation. I hope the officers involved will be treated the same as any ordinary citizen (grand jury, trial, sentence) by the court system. It sounds as if they made a very costly mistake; more details amy emerge later.
I think it is not a good idea to open the door IF you think you need your gun. In that situation, call 911 and report unidentified armed persons on your porch and hide/barricade away from them to give everybody more time for important decisions (shoot or no shoot, announce, etc.).