First, keep riding and see if it's persistent or just transitory.
Had a moment of panic up in Canada a couple of weeks ago when, after riding through rain for several hours and then stopping to refuel, found that the bike would quit on me at very low speed and not hold idle. Held the throttle open in neutral for a while; seemed to get better. Then did a 110 kph ride for another few hours. The problem went away.
Any number of hypotheses, not of which could be proven: sucked in some water momentarily somewhere, bad gas (or water dripping in at refuel), or God doesn't love me.
Never had a problem before on my K11 or this K12 in the rain, but I acknowledge Murphy's law and so always wait to see how serious Murphy really is.
Larry Johnson