File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313HTTP_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 )
You can’t perform that action at this time.
0 commit comments