Even when I couldn’t offer empathy for someone who was being snappish or grumpy with me, I could at least take a step back and just leave them alone for a while. If it’s a stranger, I’m never going to see them again anyway, and if it’s a family member they’ might explain what happened the next time they see.
But my general attitude is to treat such behavior from the people I interact with like a phone call: I tried to call you, and we got a bad connection or got disconnected. I’ll call you back!