Sarah, here is the definition of error 23:
Error 23
Cannot restore or update due to hardware problems.
* In software you have to set default web browser.
* In hardware, it's a communication problem. Check all connections, also try to change battery.
* faulty baseband flash or processor
There are a few instances where users were able to fix or sidestep error 23. Pain in the neck and again it looks there are issues with jailbreaking etc. Just in case you still have your phone together, may be you can give it a try. Who knows and nothing to lose I suppose, http://support.apple.com/kb/TS1275 and http://www.ipodtouchfans.com/forums/showthread.php?t=192901 and try this one if you like.
Here are the steps.
1. download redsn0w 0.9.4
2. unzip or unrar to specified folder
3. search and download for bootloader 3.9 and 4.6
4. search and download original stock ipsw 3.1.2
5. store all downloads in one folder
6. open redsn0w
7. find 3.1.2 ipsw
8. wait to load
9. click next
10. tick "already pwnd" , unlock and Install Cydia
11. make your 2G to be in recovery mode (fastest – power off, press and hold home button and plug USB)
12. wait until redsn0w 0.9.4 finished
13. wait to reboot iPhone 2G
14. wait to iPhone gets flashed with BootNeuter 2.1 (already installed in iPhone)
15. iPhone reboots itself and voila you got rid of error
Ultimately I am sure that pollytintop is right since he does know about those iPhones and gives very sound advice....good luck