Cobras, despite popular notions, will go out of their way to not bite and *not* “waste” venom.
It may well have been a warning shot.
It takes a good bit of pestering to goad them into a full blown bite so the dog was lucky, thank God.
There are bazillions of videos of people interacting with venomous snakes available.
Wouldn’t hurt to research this and dispel some of the silly myths of “killer snakes”.
Check YouTube for “chased by a water moccasin” for good perspective.
99.9% of the time, all a snake wants is for you to leave it alone long enough that it can escape your presence.
Living in SE Asia will dispel any myths that killer snakes don't exist. Anyone keeping or breeding these creatures is a menace to society and should be dealt as such. These kinds of reptiles should not even be allowed into the country other than for legitimate research.