Having been the owner of a dog/puppy that peed in a coffee shop I can tell you the only correct reaction

You leap up, apologise, ask for cloth, mop, bucket. Juggle your dog, lead, coffee, bags, coat, hop from foot to foot, squeaking further apologies until the staff tell you to sit down and stay out of their way while they clean it up.
Then, and only then, do you notice the varying degrees of amusement and shock on the faces of other customers. So you start apologising again.
You end up with a coffee refill, a dog biscuit and some new friends- all of whom reassure you that it happens, but you have start somewhere.
But only in really dog friendly places. Elsewhere you are treated as though you just poisoned the milk bottles (an old Tales of the Unexpected plot).
Short answer: I don't take my dog into cafes that don't allow them. Maybe you should avoid those that do!