So when you're potty training, accidents are bound to happen. It kind of just comes with the territory of having a puppy. Obviously preventing them is the best way to handle them. If you're setting your dog up for success in the first place, there will be much fewer accidents to deal with. However, they're bound to happen. So if you keep your expectations realistic and you just kind of know that it's going to happen, it will be a little less stressful for you.
However, in the event that you do see the dog in mid-pee, you can make loud noise, something to startle him or distract him. Let him know that that's not in the good column and make sure that you get him to a place that's appropriate for him to finish his business. Then reward him vigorously for that. Then make sure that subsequent elimination happens in the appropriate place. If you do come across something that you missed, it's your fault not his. He shouldn't be unsupervised and roaming around your house. A lot of times, people will come across something, and the old school thing would be to bring the dog over and show it to him and yell at him. But a lot of times that could actually really damage your relationship with the dog.
The dog doesn't have the capacity to understand. They also have a different relationship with urine and feces than we do. Anybody who has a puppy can tell you that they're not as turned off by it as we are. So we want to make sure that we're not overreacting, but that we're setting the dog up for success. And in the event that there is an accident, you're there to see it and give the dog information about it. That's how to get started on dealing with potty accidents.