I would have tried to explain what happen to mine and how I fixed it but this is easier LOL!
P0420 Error Code: Catalyst System Efficiency Below Threshold (Bank 1)
The catalytic converter has an oxygen sensor in front and behind it. When the vehicle is warm and running in closed loop mode, the upstream oxygen sensor waveform reading should fluctuate. The downstream O2 sensor reading should be fairly steady. Typically the P0420 code triggers the Check Engine Light if the readings of the two sensors are similar. This is indicative of (among other things) a converter that is not working as efficiently as it should be (according to specs). It is part of the vehicle emissions system.
Causes
A code P0420 may mean that one or more of the following has happened:
Leaded fuel was used where unleaded was called for
An oxygen sensor is not reading (functioning) properly
The engine coolant temperature sensor is not working properly
Damaged or leaking exhaust manifold / catalytic converter / exhaust pipe
Retarded spark timing
The oxygen sensors in front and behind the converter are reporting too similar of readings
Solutions
Some suggested steps for troubleshooting a P0420 error code include:
Check for exhaust leaks at the manifold, pipes, catalytic converter. Repair as required.
Use a scope to diagnose the oxygen sensor operation (Tip: The oxygen sensor in front of the catalytic converter normally has a fluctuating waveform. The waveform of the sensor behind the converter should be more steady).
Inspect the downstream heated oxygen sensor (HO2), replace if necessary
Replace the catalytic converter
My guess is when you replaced the mid-pipe either an 02 sensor got messed up or not plugged in right or there is a leak at the manifold and just needs tightened up. I would start with the 02 sensor, and in case you dont know, dont touch sensor part it will cause them to fail.