When your child is frustrated, it can be equally frustrating for you, especially if you have a young preschooler who can't yet express everything he needs and wants. Your first reaction may be avoidance- to turn away and let your child figure it on on his own. Or, you may enter into a frustration battle with your child that ends up with both of you melting down.
Next time, try connecting with your child by saying this: How can I help you right now? It will challenge her to use her words and think through her emotions, why she's frustrated, and what she needs in the situation. And it will help you connect with your child in a way that will be meaningful and work through the frustration more quickly :)