In the 1981 case Warren v. District of Columbia, the D.C. Court of Appeals held that police have a general "public duty," but that "no specific legal duty exists" unless there is a special relationship between an officer and an individual, such as a person in custody.
https://www.findlaw.com/legalblogs/law-and-life/do-the-police-have-an-obligation-to-protect-you/