Yikes. No idea. My iPhone 4S is very cooperative most of the time. Might just be a dud. I would take it in to the closest apple store, or whatever store you purchased it at ASAP to get a new one or so they can fix it. Since it's new, they should do it no questions asked.
Also, have you googled that error code?