It’s not likely that you could catch an STI this way because there are no known ways for viruses or bacteria to be passed through touch alone. However, if your partner has an active infection, they might have been exposed, and you should consider getting tested if you think you may have been infected.