If it happend before you bought it, like during someone else's test ride, and it was sold to you as a new bike, then they should get you another frame. If it happend while you were riding it, then you should get it painted or do whatever else makes you happy.
Either way you need a chain catcher and you need to make sure the front derailleur is adjusted correctly.
I also recomend putting some black electrical tape on the chainstay to protect it should it happen again even with the chain catcher.