Class LastAdminException

All Implemented Interfaces:
Serializable

@ResponseStatus(BAD_REQUEST) public class LastAdminException extends RuntimeException
Thrown when an attempt is made to remove the last admin of a group. This exception ensures that every group always has at least one admin.
See Also:
  • Constructor Details

    • LastAdminException

      public LastAdminException(Long groupId)
      Constructs a LastAdminException for the specified group ID.
      Parameters:
      groupId - the ID of the group where the last admin removal was attempted