Always check the weather forecast in advance. But for circumstances where rain is an immediate problem, what to do if it rains is stop application immediately.
Any product applied on a wet surface risks not bonding correctly.
If within the 20-minute curing window, cover up your existing work and wait for a good dry spell to continue. Thoroughly dry the coat between applications.