My 02 cents
It is always better being on the ground wishing you were in the air than being in the air wishing you were on the ground, so if in doubt land at the nearest suitable aerodrome
However the key to dealing with in air malfunctions is solid systems knowledge. A failure of the electric flaps to move in a Cessna is just that an inability to change flap position. It is almost always an electrical issue and does not per se mean that the airworthiness of the aircraft is compromised. The performance will certainly be compromised, however so a decision needs to made as to whether it would be wise to continue the trip.
I once had to deliver a Cessna 421 from Toronto to Vancouver. By the time the aircraft made it to Vancouver I had documented 58 defects. I started out with what was supposed to be a day/night VFR/IFR known icing capable airplane and by the end of the flight was only continuing in day VFR unpressurized flight conditions. There was a lot of things not working but the failures could be ameliorated by changing how/when I flew.