Intermittent ND code

I keep getting an intermittent ND code - I installed a new drain pump & nothing happened (the washer would not spin at all) – I the renistalled the old pump & the washer runs/spins intermittently like before (I have to wait about an hour between spin cycles)…