Hello and good day trepacho. I am sorry for the trouble this has caused and thank you for reaching out. With regard to this matter. Please try to update the firmware of your DJI Mavic Mini to the latest version and please calibrate the IMU and Compass of the said drone as well to isolate the issue. Please keep us posted for further assistance. Thank you and have a safe flight always.
As far as I observed, the "Sensor error" appears when the GPS signal gets too weak during the flight. I'm not sure whether it is a correct interpretation, but this is what I connected the warning to when flying.