Without knowing what the error message said all I can suggest is:
- Also try DFU mode after try recovery mode
- If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
- If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
This error is often related to USB timing. Try changing USB ports, using a different dock connector to USB cable, and other available USB troubleshooting steps (troubleshooting USB connections. If you are using a dock, bypass it and connect directly to the white Apple USB dock connector cable. If the issue persists on a known-good computer, the device may need service.
If the issue is not resolved by USB isolation troubleshooting, and another computer is not available, try these steps to resolve the issue:
- Connect the device to iTunes, confirm that the device is in Recovery Mode. If it's not in Recovery Mode,put it into Recovery Mode.
- Restore and wait for the error.
- When prompted, click OK.
- Close and reopen iTunes while the device remains connected.
- The device should now be recognized in Recovery Mode again.
- Try to restore again.
If the steps above do not resolve the issue, try restoring using a known-good USB cable, computer, and network connection.