CourseUserLimitExceededException

class CourseUserLimitExceededException[source]

Exception raised when a course user limit is exceeded.

course_id: int

The id of the course that has the restriction.

user_type: Literal['staff', 'student']

Which user type is at its limit: “student” or “staff”.

current_count: int

The current number of users of this type in the course.

limit: int

The maximum number of users of this type allowed in the course.

add_note(object, /)

Exception.add_note(note) – add a note to the exception

args
with_traceback(object, /)

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

missing_permissions: Sequence[GlobalPermission | CoursePermission] | None

If the exception was caused by missing permissions this will be a list of permissions that are missing. You might not need all permissions in this list.

user_id: int | None

The id of the user that does not have the permission.

response: Response | None

The response that generated this error, only present if this data was parsed as toplevel exception from a response.

message: str

The user readable message for the exception.

description: str

A more detailed version of the error message.

code: APICodes

What type of error is this?

request_id: str

The id of the request that went wrong. Please include this id when reporting bugs.