Consistent with the rule that you do not have a right to resist an unlawful detention or arrest unless the officer is using or threatening to use excessive force against you, you still have a remedy.  You have the right to sue for false arrest after the fact.