annoyance that something has not turned out the way you wish
chagrin - annoyance
‘Chagrin’ is a formal term that expresses disappointment, embarrassment, or annoyance that an expected outcome has not occurred, especially due to a failure or mistake. It is most commonly used in the form ‘(much) to (one’s) chagrin'.
Mary thought she was a shoo-in for the vacant role. Much to her chagrin, I got it instead.
My report stated that human error was to blame for the problem. I was chagrined to later discover that that was false.
The politician expected a large crowd to attend his speech, but to his chagrin, very few people turned up.