Well in this particular case it was pretty much all politics. Had it been about the code it would have had a different outcome.
The person making the threat felt they were immune from backlash, but they were threatened by where I was working in the code base because they lacked the expertise to compete on a technical level. What I found even more interesting was that our mutual manager felt that his position was an even more tenuous political position so he wasn't going to do anything he wasn't told to do by someone above him in the chain of command.
If someone working for me threatens to quit, I first ask them if their issue can be resolved rationally, and if it can't I ask them when will their last day be. But that is because even if my boss then comes to me and says "You told this guy who is friends with <important person> to quit? Your fired!" I am totally ok with that. Not everyone is.
To look at the flip side though as to whether I screwed up or not, I'm reasonably self aware enough to know when I do. And prior to this incident going 'nuclear', as it did, I had come at it from several different directions to try to eliminate bias. Every third party consulted felt my reasoning was pretty sound. But we all know that being "right" doesn't mean you get what you want in a politicized environment. Just ask the Ukrainians living in Crimea, life is what it is. We move past it.
Those are pretty big flags that you screwed up.