You did a favor to another person. He didn't act as you expected and felt hurt.
Your intention was polluted. You never did it only for Allaah. You expected something from the person.
When you do something only for Allaah you are unconcerned about what others think of you or do to you.
Rectify your intention before every act. Do it only for Allaah.
Back to the basics.