You get arrested by the police while in Las Vegas, on suspicion of drug charges. You know that you did nothing wrong the entire time. The police eventually come to the same conclusion and release you, saying that their information was inaccurate.
While they clearly made the wrong arrest, is this actually illegal? It may be, but it may not. It all depends on the specifics of the case. You do have a Fourth Amendment right protecting you from an unreasonable seizure. Whether the arrest was unreasonable or not depends on how it happened.
For instance, perhaps the police had no evidence against you at all. You did nothing wrong. The police just did not like the way you looked and stopped you on the street. When you asked if you were free to go, the officer got angry and decided to arrest you.
This could be an illegal arrest since it had no basis. You shouldn't even have gotten stopped. You may have an especially strong case if you think that the officer profiled you based on factors like your age or your race. Did you really get arrested because you are African American and the officer is biased against African Americans? Or did you get stopped because you are a teen and the officer assumed teenagers are always breaking the law?
That said, some mistakes do happen, and they could be reasonable. The police are not perfect. Simply arresting someone who turns out to be innocent does not mean the arrest was completely illegal.
For instance, perhaps an officer saw a drug deal in progress. The person selling drugs was wearing a blue hooded sweatshirt and jeans. That person noticed the officer approaching and ran.
As the seller went around the corner, he or she passed you. You were also wearing a blue hooded sweatshirt and jeans. Though your clothes were a slightly different color, you were about the same age and build as the suspect.
That person disappeared into the crowd. Then the officer ran around the corner and arrested you, believing you were the person who fled the scene.
Clearly, the officer is wrong, but he or she did witness a crime and reasonably believed you were the right person to arrest. It's a mistake, but the officer did not break the law.
Of course, getting arrested for something you did not do, whether or not the arrest was technically illegal, is still very unnerving. Make sure you understand all of the legal defense options you have.