why does my check engine light comes on and stays on on 2010 Nissan Titan

diagnostic test showed that the fuel pump is faulty. It was changed. The fuel rail pressure sensor was also changed.
The problem occurs sometimes when the vehicle sits for very long hours - engine not running and also during accelleration or crusing. The vehicle was serviced regularly.
Please note that the problem continued even after the fuel pump and fuel rail pressure sensor was changed.

Asked by for the 2010 Nissan Titan
there is no code for a bad fuel pump. there is one for the float sensor.
a code never identifies a failed part, just a failed system. you need to have a diag from a shop familiar with these repairs. i would not throw any more parts at it till you get it identified.

Midi said the check engine light is on. I know there's no code for a bad fuel pump but there sure is a code for the check engine light being on.
There are codes that do indentify bad parts.
thanks for that info.
1 more answer
What are the trouble codes?
Again what are the code/codes that are in the PCM?