The problem is the courts hold the department responsible.
Errors and omission insurance or Malpractice a great idea, but the cops feel protected by their jurisdictions.
and cops are protected by this in California
https://porac.org/resources/peace-officers-bill-of-rights/