If the wire isn’t completely broken and if it is still working, you can also add some MSeal around it, this worked well for my adapters. Besides, I think it is a better idea to prevent cable breaks rather than fixing it afterwards. You can know more about here.