Although the barking is frustrating, so never tell your dog off.
Avoid that thing that finds your dog scary.
Teach your dog what they want to say to you.
Don't give a reward to your dog for barking.