Here's a background of error 50 according to the Apple support website as a background information of your error:
''Error 13, 14, 35 and 50 (or -50)
These errors are typically resolved by performing one or more of the steps listed below:
Perform USB isolation troubleshooting, including trying a different USB port directly on the computer. See the advanced steps below for USB troubleshooting.
Put a USB 2.0 hub between the device and the computer.
Try a different USB 30-pin dock-connector cable.
Eliminate third-party security software conflicts.
There may be third-party software installed that modifies your default packet size in Windows by inserting one or more TcpWindowSize entries into your registry. Your default packet size being set incorrectly can cause this error. Contact the manufacturer of the software that installed the packet-size modification for assistance. Or, follow this article by Microsoft: How to reset Internet Protocol (TCP/IP) to reset the packet size back to the default for Windows.
Connect your computer directly to your Internet source, bypassing any routers, hubs, or switches. You may need to restart your computer and modem to get online.
Try to restore from another known-good computer and network.''
-Try a different computer.
-Reinstall iTunes and try again.
IF NONE OF THE ABOVE WORK
-It may be due to a corrupt OS not allowing you to update. You need to enter recovery mode through your iPhone and restore your device.
-Let me know how it goes!