Unless the fly has some sort of disease itself or is carrying a certain bad bacteria then you're unlikely to get sick from swallowing a fly.
I've swallowed flies before when they gotten into my coffee, tea etc and it was too late to spit the fly out because the fly had already went down my throat.
Swallowing the fly felt gross but I never got sick from the fly and your stomach acid will kill the fly shortly after it enters your stomach.
So the fly will cause you no harm in most cases after swallowing the fly and it will be digested and sent through your body soon after you swallow it.
If you do get the fly in your mouth you should try to spit it out if possible but if you accidentally swallow the fly then there's nothing bad gonna happen.