It was a little rude in a way - which is hard to say about a family member - and it was definitely the thought that counts. (And I could be taking it somewhat personally.) Anyway, I should have given a gift card with a little less junk food. Next time! I really thought it would be a liked gift. Oh well. I shall let this go soon.
No, you shouldn't have done anything differently. You had some uncertainty about what to give, but you still did the best you could, otherwise you would have chosen to do something else. You didn't fail at anything. While it is impossible to not let people being negative affect you, at the same time, I would say, don't let it affect you! You're not a mind reader. You can't control his reaction. There's nothing you could have done that would have been better, otherwise you would have done it. Even if you had thought of something that would have been better, but it was too time-consuming or expensive, you still would have made the final decision for good reasons (humans have significant limitations).
Examine your expectations. You wanted to make someone happy for a little while. This is kind and good! But at the same time, recognize that you don't have enough control to guarantee success.
Giving as Jesus taught us does not expect anything in return, and that includes gratitude. Focus on why you are giving and find success in fulfilling that goal. I am guessing that you care about the person. You showed you cared. Success! You wanted to make them happy for a little while: the goal there
before God is that you did something with that heart attitude. Success! Rejoice in your success if you do this:
And whatever you do, whether in word or deed, do it all in the name of the Lord Jesus, giving thanks to God the Father through him. (Colossians 3:17, 1984 NIV)
You can only do what you can do with what you know. We all do things with certain hopes of results, but we need to leave the results up to God.
Hoping for a positive reaction is good, but a pattern of expecting to be successful
in the way you imagine indicates you aren't leaving God things up to God.
Niebuhr's (a theologian) serenity prayer is rooted in spiritual truths:
God, grant me the serenity to accept the things I cannot change,
Courage to change the things I can,
And wisdom to know the difference.
It's OK to recognize that a family member was rude. But were they impolite, or just being honest? He is not in control of how he feels when he sees the gift. (He also has expectations based on impossible-to-have knowledge).
Don't feel like you need to be apologetic. Don't be apologetic (except when it is how you show politeness). Defend yourself against other people's expectations, as well. Most people (all fallen) are usually doing the best we can given our limitations.