Was this correct

I have been having some major differences with my husband to the extent that I am planning to leave him. I was very upset one day so I shared all this with a close friend of mine. She without telling me spoke to my husband on the phone and tried to patch us up. It didn’t help as the issues are way too many. I had no idea that she had spoken to him. But a few days later me and hubby had a fight and he shouted that “even ur so called friends call me” I asked him what is he talking about? He told me that my friend has been calling him up a couple of times so that we both patch up.

I was shocked and very disheartened as she is my friend. She should have asked me once or told me about it .

When I confronted her she said she did it for my good. She said her intention was right. I feel disgusted . I trusted her. I was not looking for a solution from her. I just wanted her to listen to me. And be there for me. It’s for me and my husband to sort out our differences. I’m hurt by her behaviour. She could have told me that she’l call him up . Or she could have told me later that she spoke to him. I’m hurt and I questioned her loyalty? To which she replied she did the right thing.

Am I wrong? Am I overreacting? Isn’t she being disloyal?