Help? 😕

Just need to know I’m not the one in the wrong here. I’ve been with my boyfriend for 2 years now and we really close well I thought at least. I have a really close mate who I’m with most of the time and he got really upset and said it seems like I like him so we talked about it and sorted it all out but he felt like it for a long time and instead of telling me told a girl he’s known for 2 months maximum and isn’t that close with is it wrong for me to be upset over that? I feel like he isn’t comfortable telling me stuff but I don’t know why he’s informing her about something that’s happening in out relationship? 🤔