The check engine light comes on, it might be the fuel cap not sealing tight. on 2005 Pontiac Bonneville

I was told that rust where the gas cap screws on will cause a sensor to trip and turn the check engine light on. Will sanding the rust help by making better contacy?

Asked by for the 2005 Pontiac Bonneville
could be several issues but if there is a seal issue with cap that needs to addressed 1st
1 more answer
You can try cleaning off the rust and replacing the cap. But be very careful not to allow any debris to fall into tank when cleaning the rust.