Normally, a bench warrant is issued because you failed to come to court for a court date. A new crime can be charged (such as bail jumping) but if not you can be held based on the warrant until the case is heard and resolved or until you post new bail. That the case you were held on was later dismissed may be a basis for a 1983 civil rights complaint, you could claim this time as part of the damages. OTOH you caused the damage by not appearing. You should contact a constitutional or civil rights lawyer to protect your interests.
Disclaimer: This site is for general educational purposes. My answering your question is based on my knowledge of the common law. Do not assume I know your state’s law or that I am correct. My participation in this forum is not intended to create an attorney client relationship.