aboutsummaryrefslogtreecommitdiffstats
path: root/arthur/apis/github/teams.py
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2025-07-10 14:52:57 +0100
committerGravatar GitHub <[email protected]>2025-07-10 14:52:57 +0100
commit85e5951799869074b43714ef02aa0c972c9b15cb (patch)
tree4204c96a2da4bf2da9cfcf8a30d57e8e1b0aae72 /arthur/apis/github/teams.py
parentRename Exceptions (diff)
Fix mistakes from my inferior brain (#327)
* Rename GitHubException in cog * Update GitHubException in Teams API * Update __init__.py in GitHub API with new exception naming
Diffstat (limited to 'arthur/apis/github/teams.py')
-rw-r--r--arthur/apis/github/teams.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/arthur/apis/github/teams.py b/arthur/apis/github/teams.py
index 5fcc3a0..489da90 100644
--- a/arthur/apis/github/teams.py
+++ b/arthur/apis/github/teams.py
@@ -13,7 +13,7 @@ HTTP_403 = 403
HTTP_422 = 422
-class GitHubException(Exception):
+class GitHubError(Exception):
"""Custom exception for GitHub API errors."""
def __init__(self, message: str):
@@ -31,13 +31,13 @@ async def add_staff_member(username: str) -> None:
except aiohttp.ClientResponseError as e:
if e.status == HTTP_404:
msg = f"Team or user not found: {e.message}"
- raise GitHubException(msg)
+ raise GitHubError(msg)
if e.status == HTTP_403:
msg = f"Forbidden: {e.message}"
- raise GitHubException(msg)
+ raise GitHubError(msg)
if e.status == HTTP_422:
msg = "Cannot add organisation as a team member"
- raise GitHubException(msg)
+ raise GitHubError(msg)
msg = f"Unexpected error: {e.message}"
- raise GitHubException(msg)
+ raise GitHubError(msg)