Files
edx-platform/lms/djangoapps/teams/errors.py
Kyle McCormick 7dbee1c3dd Ensure Python 3 compatibility of Teams djangoapp (#22096)
* For all files, from __future__ import unicode_literals.
* Add @python_2_unicode_compatible to both models.
* Test six.string_type(obj) for both models.

Also, fix some new pylint warnings and improve model repr methods.

MST-24
2019-10-22 13:42:27 -04:00

30 lines
796 B
Python

"""
Errors thrown in the Team API.
"""
from __future__ import absolute_import, unicode_literals
class TeamAPIRequestError(Exception):
"""There was a problem with a request to the Team API."""
pass
class NotEnrolledInCourseForTeam(TeamAPIRequestError):
"""User is not enrolled in the course for the team they are trying to join."""
pass
class AlreadyOnTeamInCourse(TeamAPIRequestError):
"""User is already a member of another team in the same course."""
pass
class ElasticSearchConnectionError(TeamAPIRequestError):
"""The system was unable to connect to the configured elasticsearch instance."""
pass
class ImmutableMembershipFieldException(Exception):
"""An attempt was made to change an immutable field on a CourseTeamMembership model."""
pass