I guess that depends on your definition of "threat". Serbia was dominated by the Austro-Hungarian empire, like most of the Balkans at that time, so in terms of a military threat, no it wasn't. However, the assassination of Archduke Franz Ferdinand was an act of terrorism, so it would have been unreasonable for Serbia not to expect some kind of reaction, and, I think, unreasonable for historians in the present day too.
But Ferdinand's assassin was acting in concert with several other assassins that day, representatives of a Serbian nationalist group, covertly backed by the Serbian military. While the militants who wanted independence from the empire could not be called a direct threat to Austria-Hungary itself, they could be called a threat to their continued hold on the Slavic colonies.
But the ultimatum was exceedingly harsh, partly out of rage and partly out of colonial pride, I suspect, and the terms were not ones Serbia was likely to accept, and a full scale invasion of the country was an extreme overreaction.
What I tell my students when this topic comes up is that if someone murdered Prince Charles of Britain (equal to the Archduke in stature as heir to the British throne), no one would expect Britain, even today, to stand idly by or to let another country conduct the investigation. So it's not impossible to see where the Austro-Hungarians were coming from.