My WD Passport Keeps Disconnecting

Lately after random periods of time my usb WD passport has been disconnecting, I feel like it’s due to me connecting it into someone else’s computer for something, and I’ve read up on it some but the only solution I’ve seen is that I’ll have to reformat it. I really don’t want to do this so does anyone know any other solutions I can try?