How do you repair intermittent electric door locks on a 2004 Chevrolet Colorado?

Probably by checking the wiring loom and connectors for damages and and corrosion.