In the heat of the moment, it can be difficult to rein in some reactions, but it's always best to give your head the time it needs to catch up to your heart. You see it on social media plenty, people posting angry replies that they didn't think through and subsequently finding themselves in hot water for it.
It's unlikely that Secretary of State Mike Pompeo will see many repercussions for his poorly thought-out reaction on Twitter, but nevertheless, it's not a great look for a senior cabinet member.