My 27 month old makes me think I'm losing my hearing sometimes, between his higher-pitched (and thus less easily understood) voice, and his obviously imperfect enunciation. I'm totally with you on this one.
What I do is try to avoid saying "what", or other "I didn't understand you" type phrases. They are understandably frustrating. I know a family member who is hard of hearing, and it's extraordinarily frustrating to him when he has to say that all the time; the reverse is true alos.
Instead, I try as hard as I can to say something in context. This only works if I understood a bit of what he was talking about, of course, or it's obvious from our surroundings; but if it's not the first thing he's said to me, I probably have something to go with. Here's an example from yesterday walking home from daycare.
(conversing as we walk by a sidewalk under construction)
Daddy, why sidewalk ..... ..... ..... ?
J, are you asking why we're not walking on the sidewalk?
Daddy, why sidewalk ..... ..... shun?
Oh, you're asking why the sidewalk is under construction.
(nodding)
Well, they wanted to make it a new sidewalk, because the old one was, well, old, and it wasn't bumpy like the new ones, so it isn't as safe for people with wheelchairs.
Asahhasfjlk?
The sidewalk is bumpy so you don't fall when it gets slippery, particularly if you have a wheelchair and have to go up it.
(points) New sidewalk.
Yep, this is new sidewalk, and that's what it will look like later when it's done.
So in the first question, I asked him if he was asking . That not only told him I was paying attention (very important!) but gave me some clues when the second garbled message came through - because he emphasized certain sounds, namely the ones I got wrong; here, "construction" (which he of course can't say properly, but "shun" comes through clear enough when he tries).
Then the second time we had a bit of confusion, I'm not sure if I guessed right, or if I just redirected him from something else - and that's life with a toddler, really; but either way making a guess like that can be less frustrating to the child than saying 'What was that?'. It directs the attention away from "you didn't speak clearly enough" to "I'm talking to you, even if Daddy is a bit silly sometimes and doesn't get it right".
This doesn't always work perfectly, of course, when he's expressing a desire for something - if I guess wrong a few times it gets frustrating - but that's unavoidable, and most of the time I guess right within a few guesses.