Often times there might just be one single wire messing up the data between the ECM and the engine and as a result it wont start or read the scanner tool
Is it better to buy a new one or rebuild the wiring harness?
Although getting your hands on a new wiring harness would be preferable sometimes it's hard to find one, and when you do they are usually very expensive passing the 1k range, here's a link: Wiring Harness and often times would just be the wiring harness that goes from the ecm to the engine not to the cabin.
How would we Fix it?
It's a simple but tedious task since you have to inspect each cable and pin to see where to location is but usually we can tell within the hour which cable it is.