Did you do any new wiring?
How is the wiring integrity? did you check the wires in the Mass air flow sensor fith a multi meter/test light?
Are the parts you used are OEM?
Our Petrol engines also give apps (accelerator paddel position sensor) fault when the sensor is bad, since it is connected...