diff --git a/silo_client/__init__.py b/silo_client/__init__.py index 3447536..2a930af 100644 --- a/silo_client/__init__.py +++ b/silo_client/__init__.py @@ -844,16 +844,7 @@ class SiloClient: def delete_bom_entry(self, parent_pn: str, child_pn: str) -> None: ppn = urllib.parse.quote(parent_pn, safe="") cpn = urllib.parse.quote(child_pn, safe="") - url = f"{self.base_url}/items/{ppn}/bom/{cpn}" - headers = {"Content-Type": "application/json"} - headers.update(self._auth_headers()) - req = urllib.request.Request(url, headers=headers, method="DELETE") - try: - urllib.request.urlopen(req, context=self._ssl_context()) - except urllib.error.HTTPError as e: - raise RuntimeError(f"API error {e.code}: {e.read().decode()}") - except urllib.error.URLError as e: - raise RuntimeError(f"Connection error: {e.reason}") + self._request("DELETE", f"/items/{ppn}/bom/{cpn}", raw=True) # -- Schemas ------------------------------------------------------------