It is case like this that should prompt the Supreme Court to Overturn their Legal Fiction they created out of thin air called “qualified immunity”
Along with the one called “Absolute immunity”.
I like #5 of the Code of Hammurabi:
5. If a judge try a case, reach a decision, and present his judgment in writing; if later error shall appear in his decision, and it be through his own fault, then he shall pay twelve times the fine set by him in the case, and he shall be publicly removed from the judge’s bench, and never again shall he sit there to render judgement.