In 2005, Jessica Gonzales sued Castle Rock, Colorado police for failing to arrest her husband, who had violated a protective order, resulting in the murder of her three children. Her case went to the U.S. Supreme Court in The Town of Castle Rock v. Gonzales, where she lost because even though the order required arresting her husband upon violation, then-Justice Antonin Scalia successfully argued that “a well-established tradition of police discretion has long coexisted with apparently mandatory arrest statutes.”
This case builds upon Supreme Court precedent in Deshaney v. Winnebago County Department of Social Services (1989). In that case, a young boy was repeatedly abused at the hands of his father, something that county Social Services was aware of, but made no effort to remove the child. His mother sued once the four-year old entered a vegetative state, and the Court ruled that that the state did not have a special obligation to protect a citizen against harms it did not create.
https://prospect.org/justice/police-have-no-duty-to-protect-the-public/