Files
edx-platform/common/djangoapps/enrollment/errors.py
stephensanchez 22a18e350d Updating the design of the DRF views for enrollments.
Consolidate PUT and POST on the RESTful Layer.

Change URLs for API

Test cleanup.

Adding a course details URL to the enrollment API.

Change student to user

Change to v1, remove feature flag from API URLs

Updating student to user in tests

Re-ordering redirect urls to be evaluated last.

Adding pagination and testing.

Adding Django REST settings for pagination.

Revert "Re-ordering redirect urls to be evaluated last."

This reverts commit 4c9502daa383e49b46f8abec5456c271e5e24ccb.

Re-ordering redirect urls to be evaluated last.

Conflicts:
	common/djangoapps/enrollment/urls.py

Revert "Adding Django REST settings for pagination."

This reverts commit 9f8a54c41f34caa24818c88f1e75ac59f6ce5259.

Conflicts:
	common/djangoapps/enrollment/urls.py

Revert "Adding pagination and testing."

This reverts commit 0b2d46262abb78f5ad170700205e7fd28b6af942.

Additional testing, logging, and error messages.
2014-12-18 15:39:01 +00:00

49 lines
1.1 KiB
Python

"""All Error Types pertaining to Enrollment."""
class CourseEnrollmentError(Exception):
"""Generic Course Enrollment Error.
Describes any error that may occur when reading or updating enrollment information for a user or a course.
"""
def __init__(self, msg, data=None):
super(CourseEnrollmentError, self).__init__(msg)
# Corresponding information to help resolve the error.
self.data = data
class CourseNotFoundError(CourseEnrollmentError):
pass
class UserNotFoundError(CourseEnrollmentError):
pass
class CourseEnrollmentClosedError(CourseEnrollmentError):
pass
class CourseEnrollmentFullError(CourseEnrollmentError):
pass
class CourseEnrollmentExistsError(CourseEnrollmentError):
pass
class CourseModeNotFoundError(CourseEnrollmentError):
"""The requested course mode could not be found."""
pass
class EnrollmentNotFoundError(CourseEnrollmentError):
"""The requested enrollment could not be found."""
pass
class EnrollmentApiLoadError(CourseEnrollmentError):
"""The data API could not be loaded."""
pass