diff --git a/otterdog/providers/github/rest/repo_client.py b/otterdog/providers/github/rest/repo_client.py index bb91264..7d5c20c 100644 --- a/otterdog/providers/github/rest/repo_client.py +++ b/otterdog/providers/github/rest/repo_client.py @@ -472,7 +472,9 @@ async def _update_github_pages_config(self, org_id: str, repo_name: str, gh_page build_type = gh_pages.get("build_type", None) if build_type == "disabled": - await self.requester.request_raw("DELETE", f"/repos/{org_id}/{repo_name}/pages") + status, body = await self.requester.request_raw("DELETE", f"/repos/{org_id}/{repo_name}/pages") + if status != 204: + raise RuntimeError(f"failed to disable github pages for repo '{repo_name}': {body}") else: gh_pages_data: list[tuple[str, str, int]] = [] # first check if the pages config already exists: