What you should never do to an unfamiliar dog.
This could have happened with any dog.
The reporter should never have done what he did (hover over dog, hands close to dog’s throat). To anyone familiar with dog behavior and body language, the signs of nervousness should have been extremely obvious (position of ears, body posture trying to avoid and lean away, lip-licking, etc). Of course, the reporter missed all of it.
The fact that the officer held the leash even worked in the reporter’s disfavor. Dogs know when they’re being restrained (on a leash). The Shepherd felt trapped (hence the nervousness). Unable to escape, he issued a warning (i.e., the “bite” wasn’t really an “attack” at all, but a warning). I suspect the officer himself was nervous about the whole situation before the incident even occurred, something the dog was aware of and that increased the likelihood of the incident occurring in the first place.