p0401 code EGR insuficient. on 1998 Mazda B2500

Rookie cbe0621eac06868b3efe0d8d1d3611e23c60d3114864ea2ec19a68cfbd3eebab
if the catalytic converters guts were knocked out would this code be normal i have just moved to Texas and they failed it on the inspection. so i need to fix asap.i have replaced the sensor and the EGR valve and the engine light still comes on with the same code after being reset. thanks
(1) Answer
There is back pressure sensing with the EGR system, so a gutted CAT could make a difference. However, the best thing to do is to really inspect the issue. here is an article that I wrote that describes how to inspect for a P0401. On a Ford/Mazda ( very close really ) the DPFE or EGR feedback sensor should be carefully checked as well. It has 2 rubber tubes that sense exhaust back pressure ( that is why a hollowed CAT be a problem ) . But don't just buy a CAT, it may be the sensor, a bad valve, a bad vacuum solenoid not opening the valve etc, etc.