diff options
author | 2025-07-10 14:36:40 +0100 | |
---|---|---|
committer | 2025-07-10 14:36:40 +0100 | |
commit | 384155638315d5dff1b5966eed670ba19798688d (patch) | |
tree | ec5cf780a8d608e46fbbf68559fcb70c80df5ff6 | |
parent | Typo on GitHubException import (diff) |
Rename Exceptions
-rw-r--r-- | arthur/apis/github/teams.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arthur/apis/github/teams.py b/arthur/apis/github/teams.py index 489da90..5fcc3a0 100644 --- a/arthur/apis/github/teams.py +++ b/arthur/apis/github/teams.py @@ -13,7 +13,7 @@ HTTP_403 = 403 HTTP_422 = 422 -class GitHubError(Exception): +class GitHubException(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 GitHubError(msg) + raise GitHubException(msg) if e.status == HTTP_403: msg = f"Forbidden: {e.message}" - raise GitHubError(msg) + raise GitHubException(msg) if e.status == HTTP_422: msg = "Cannot add organisation as a team member" - raise GitHubError(msg) + raise GitHubException(msg) msg = f"Unexpected error: {e.message}" - raise GitHubError(msg) + raise GitHubException(msg) |