Skip to content

Commit 3841556

Browse files
authored
Rename Exceptions
1 parent 23c2126 commit 3841556

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

arthur/apis/github/teams.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
HTTP_422 = 422
1414

1515

16-
class GitHubError(Exception):
16+
class GitHubException(Exception):
1717
"""Custom exception for GitHub API errors."""
1818

1919
def __init__(self, message: str):
@@ -31,13 +31,13 @@ async def add_staff_member(username: str) -> None:
3131
except aiohttp.ClientResponseError as e:
3232
if e.status == HTTP_404:
3333
msg = f"Team or user not found: {e.message}"
34-
raise GitHubError(msg)
34+
raise GitHubException(msg)
3535
if e.status == HTTP_403:
3636
msg = f"Forbidden: {e.message}"
37-
raise GitHubError(msg)
37+
raise GitHubException(msg)
3838
if e.status == HTTP_422:
3939
msg = "Cannot add organisation as a team member"
40-
raise GitHubError(msg)
40+
raise GitHubException(msg)
4141

4242
msg = f"Unexpected error: {e.message}"
43-
raise GitHubError(msg)
43+
raise GitHubException(msg)

0 commit comments

Comments
 (0)