Skip to content

Commit

Permalink
fix: propagate errors when disabling gh pages config
Browse files Browse the repository at this point in the history
  • Loading branch information
netomi committed Sep 11, 2024
1 parent bf9b672 commit c5903d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion otterdog/providers/github/rest/repo_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit c5903d2

Please sign in to comment.