I had the same exact issue on my previous 330i. You can either replace the entire handle assembly or try to clean the contacts somehow. It is easier to clean it if you remove the handle assembly from the trunk. I was able to clean mine with some electrical contact cleaner. This issue with mine was that the gasket that fits between the handle and trunk was folded over during assembly and it caused water to get behind the handle and caused the contacts to become corroded. As you reinstall the handle just make sure you have a good seal as you torque the handle down.
Hope this helps.