Files
edx-platform/lms/djangoapps/teams/errors.py
M. Zulqarnain feaf5011c8 BOM-2287 : Pylint amnesty in teams,tests,survey and verify_student (#26305)
* lint amnesty in teams,tests,survey and verify_student
2021-02-03 18:15:03 +05:00

37 lines
1.2 KiB
Python

"""
Errors thrown in the Team API.
"""
class TeamAPIRequestError(Exception):
"""There was a problem with a request to the Team API."""
pass # lint-amnesty, pylint: disable=unnecessary-pass
class NotEnrolledInCourseForTeam(TeamAPIRequestError):
"""User is not enrolled in the course for the team they are trying to join."""
pass # lint-amnesty, pylint: disable=unnecessary-pass
class AlreadyOnTeamInTeamset(TeamAPIRequestError):
"""User is already a member of another team in the same teamset."""
pass # lint-amnesty, pylint: disable=unnecessary-pass
class AddToIncompatibleTeamError(TeamAPIRequestError):
"""
User is enrolled in a mode that is incompatible with this team type.
e.g. Masters learners cannot be placed in a team with audit learners
"""
pass # lint-amnesty, pylint: disable=unnecessary-pass
class ElasticSearchConnectionError(TeamAPIRequestError):
"""The system was unable to connect to the configured elasticsearch instance."""
pass # lint-amnesty, pylint: disable=unnecessary-pass
class ImmutableMembershipFieldException(Exception):
"""An attempt was made to change an immutable field on a CourseTeamMembership model."""
pass # lint-amnesty, pylint: disable=unnecessary-pass