diff --git a/repobee/cli.py b/repobee/cli.py
index b63c37b..d54ea61 100644
--- a/repobee/cli.py
+++ b/repobee/cli.py
@@ -760,7 +760,6 @@ def _create_base_parsers():
 
 @contextmanager
 def _sys_exit_on_expected_error():
-    """Expect either git.GitError or github_api.APIError."""
     try:
         yield
     except exception.PushFailedError as exc:
diff --git a/repobee/exception.py b/repobee/exception.py
index 15e6e06..6b1163e 100644
--- a/repobee/exception.py
+++ b/repobee/exception.py
@@ -40,7 +40,7 @@ class FileError(RepoBeeException):
     """Raise when reading or writing to a file errors out."""
 
 
-class GitHubError(RepoBeeException):
+class APIError(RepoBeeException):
     """An exception raised when the API responds with an error code."""
 
     def __init__(self, msg="", status=None):
@@ -48,30 +48,24 @@ class GitHubError(RepoBeeException):
         self.status = status
 
 
-class NotFoundError(GitHubError):
+class NotFoundError(APIError):
     """An exception raised when the API responds with a 404."""
 
 
-class ServiceNotFoundError(GitHubError):
+class ServiceNotFoundError(APIError):
     """Raise if the base url can't be located."""
 
 
-class BadCredentials(GitHubError):
+class BadCredentials(APIError):
     """Raise when credentials are rejected."""
 
 
-class UnexpectedException(GitHubError):
+class UnexpectedException(APIError):
     """An exception raised when an API request raises an unexpected
     exception.
     """
 
 
-class APIError(RepoBeeException):
-    """Raise when something unexpected happens when interacting with the
-    API.
-    """
-
-
 class GitError(RepoBeeException):
     """A generic error to raise when a git command exits with a non-zero exit
     status.
diff --git a/repobee/github_api.py b/repobee/github_api.py
index a1d4585..5089d7e 100644
--- a/repobee/github_api.py
+++ b/repobee/github_api.py
@@ -67,7 +67,7 @@ def _try_api_request(ignore_statuses: Optional[Iterable[int]] = None):
     Raises:
         exception.NotFoundError
         exception.BadCredentials
-        exception.GitHubError
+        exception.APIError
         exception.ServiceNotFoundError
         exception.UnexpectedException
     """
@@ -85,7 +85,7 @@ def _try_api_request(ignore_statuses: Optional[Iterable[int]] = None):
                 status=401,
             )
         else:
-            raise exception.GitHubError(str(e), status=e.status)
+            raise exception.APIError(str(e), status=e.status)
     except gaierror:
         raise exception.ServiceNotFoundError(
             "GitHub service could not be found, check the url"
@@ -191,7 +191,7 @@ class GitHubAPI(apimeta.API):
                 existing_users.append(self._github.get_user(name))
             except github.GithubException as exc:
                 if exc.status != 404:
-                    raise exception.GitHubError(
+                    raise exception.APIError(
                         "Got unexpected response code from the GitHub API",
                         status=exc.status,
                     )

diff --git a/tests/test_github_api.py b/tests/test_github_api.py
index 9976d19..df8729b 100644
--- a/tests/test_github_api.py
+++ b/tests/test_github_api.py
@@ -338,9 +338,9 @@ class TestEnsureTeamsAndMembers:
     @pytest.mark.parametrize(
         "unexpected_exc",
         [
-            exception.GitHubError("", 404),
-            exception.GitHubError("", 400),
-            exception.GitHubError("", 500),
+            exception.APIError("", 404),
+            exception.APIError("", 400),
+            exception.APIError("", 500),
         ],
     )
     def test_raises_on_non_422_exception(
@@ -421,7 +421,7 @@ class TestCreateRepos:
         side_effect_github_exception = [unexpected_exception] + side_effect[1:]
 
         create_repo_mock.side_effect = side_effect_github_exception
-        with pytest.raises(exception.GitHubError):
+        with pytest.raises(exception.APIError):
             api.create_repos(repo_infos)
 
     def test_returns_all_urls(self, mocker, repos, repo_infos, api):

Generalize exception.GitHubError to exception.APIError
Such that it makes sense for both GitLab and GitHub. Probably don't need to change any of the internals other than class names.
tests/test_github_api.py::TestCreateRepos::test_raises_on_unexpected_error[unexpected_exception0] tests/test_github_api.py::TestCreateRepos::test_raises_on_unexpected_error[unexpected_exception1] tests/test_github_api.py::TestCreateRepos::test_raises_on_unexpected_error[unexpected_exception2]
tests/test_github_api.py::TestEnsureTeamsAndMembers::test_no_previous_teams tests/test_github_api.py::TestEnsureTeamsAndMembers::test_all_teams_exist_but_without_members tests/test_github_api.py::TestEnsureTeamsAndMembers::test_raises_on_non_422_exception[unexpected_exc0] tests/test_github_api.py::TestEnsureTeamsAndMembers::test_raises_on_non_422_exception[unexpected_exc1] tests/test_github_api.py::TestEnsureTeamsAndMembers::test_raises_on_non_422_exception[unexpected_exc2] tests/test_github_api.py::TestEnsureTeamsAndMembers::test_running_twice_has_no_ill_effects tests/test_github_api.py::TestCreateRepos::test_creates_correct_repos tests/test_github_api.py::TestCreateRepos::test_skips_existing_repos tests/test_github_api.py::TestCreateRepos::test_returns_all_urls tests/test_github_api.py::TestCreateRepos::test_create_repos_without_team_id tests/test_github_api.py::TestGetRepoUrls::test_with_token_without_user tests/test_github_api.py::TestGetRepoUrls::test_with_token_and_user tests/test_github_api.py::TestGetRepoUrls::test_with_students tests/test_github_api.py::TestOpenIssue::test_on_existing_repos tests/test_github_api.py::TestOpenIssue::test_on_some_non_existing_repos tests/test_github_api.py::TestOpenIssue::test_no_crash_when_no_repos_are_found tests/test_github_api.py::TestCloseIssue::test_closes_correct_issues tests/test_github_api.py::TestCloseIssue::test_no_crash_if_no_repos_found tests/test_github_api.py::TestCloseIssue::test_no_crash_if_no_issues_found tests/test_github_api.py::TestGetIssues::test_get_all_open_issues tests/test_github_api.py::TestGetIssues::test_get_all_closed_issues tests/test_github_api.py::TestGetIssues::test_get_issues_when_one_repo_doesnt_exist tests/test_github_api.py::TestGetIssues::test_get_open_issues_by_regex tests/test_github_api.py::TestAddReposToReviewTeams::test_with_default_issue tests/test_github_api.py::TestAddReposToTeams::test_happy_path tests/test_github_api.py::TestDeleteTeams::test_delete_non_existing_teams_does_not_crash tests/test_github_api.py::TestDeleteTeams::test_delete_existing_teams tests/test_github_api.py::TestVerifySettings::test_happy_path tests/test_github_api.py::TestVerifySettings::test_empty_token_raises_bad_credentials tests/test_github_api.py::TestVerifySettings::test_incorrect_info_raises_not_found_error[get_user] tests/test_github_api.py::TestVerifySettings::test_incorrect_info_raises_not_found_error[get_organization] tests/test_github_api.py::TestVerifySettings::test_bad_token_scope_raises tests/test_github_api.py::TestVerifySettings::test_not_owner_raises tests/test_github_api.py::TestVerifySettings::test_raises_unexpected_exception_on_unexpected_status tests/test_github_api.py::TestVerifySettings::test_none_user_raises tests/test_github_api.py::TestVerifySettings::test_mismatching_user_login_raises tests/test_github_api.py::TestGetPeerReviewProgress::test_nothing_returns tests/test_github_api.py::TestGetPeerReviewProgress::test_with_review_teams_but_no_repos