This happened to me about a year ago, but I wanted to get some input in case something like this ever happens again.
I bought a new $1200 mountain bike from an LBS. On my very first ride, as I was climbing a steep hill, something went very wrong and the pedals jammed. Fortunately, I recovered without crashing. I looked at the drivetrain and saw that the chain had broken and had gone into the rear derailleur and bent it.
I took the bike back to the shop and they were very apologetic, replaced the chain, and fixed the derailleur. They said the chain was "defective." I later spoke to an expert bike mechanic about this and she said, "No, the chain was installed incorrectly." My question is, should I have demanded they replace the damaged derailleur with a new one? Should they have done this anyway? At the time, I had to trust their word that the chain was defective, but I had my doubts...