It's really past time to get rid of the qualified immunity doctrine. It's yet another "law" made up by the supreme court from whole cloth.
Prosecutors should be fully liable for illegal actions they take even when they're performing official duties. This guy should be serving a sentence years long, not days.