My boyfriend was upset that I was embarrassed to tell him I have a UTI?

I told my boyfriend I was taking antibiotics and he kept saying what for you can tell me anything . Finally I told him and he kept asking why did you feel like you can’t tell me that ? And I don’t know if I did something wrong or why he was upset about it