stalls when idling. Engine light is on. on 2004 Ford Focus

Doesnt stall when engine is cold. Doesnt stall when accelerating. Sputters before stall. Instrument panel is still lit, radio still on when it stalls (still getting spark).

Asked by for the 2004 Ford Focus
1 answer
scan codes and post so we can adv