I highly doubt this was a “mistake.” More likely it’s a “tell your friends about us” psyops action.
When I was 24-25 this kind of happened to me. I was awakened on a Saturday morning with a whole troop of undercover city cops banging on my door. They came in and searched the place top to bottom, found about 12 ‘pills’ in my purse, handcuffed and arrested me. During the search the head guy kept saying crap to me about the guy I was seeing at the time (I didn’t know it but he was under investigation for arson which I knew absolutely nothing about).
It just so happened that I was a county employee so after the first court appearance by my attorney one of the detectives came to visit me. In a round about way he said that all charges had been dropped since the drugs found were otc caffeine (they were actually diet pills) and that my name had come up as a possible dealer when they had talked to an informant. Once they found out about the connection with my boyfriend (who was under investigation) they had decided to follow the lead to see if they could get some info on him. He actually apologized to me for the treatment of me by his partner.
Sidenote: Never did many drugs and would have never contemplated dealing them.