Prosecutors have complete immunity except if they are convicted of a crime while carrying out their official duties ala Nifong (hiding evidence, destroying evidence, threatening witnesses, encouraging perjury, etc.)
In the instances here, at first glance it seems more like incompetence than criminality.