A code for a sensor does not always mean that the sensor is bad. For example, if you have an oil pressure gauge drop all the way to 0 that doesn't mean your oil pressure sending unit is bad, it means that you don't have oil pressure. Well, it could also mean that the oil pressure sending unit went bad but you'll get what I'm saying with that I think.
The more likely problem is your catalytic converter is not functioning correctly and you need to have that checked.