Class AlreadyVotedException

All Implemented Interfaces:
Serializable

@ResponseStatus(CONFLICT) public class AlreadyVotedException extends RuntimeException
Thrown when a user tries to vote for a poll they are already voted in.
See Also:
  • Constructor Details

    • AlreadyVotedException

      public AlreadyVotedException(Long pollId, Long userId)
      Constructs a new AlreadyVotedException for a specific user and poll.
      Parameters:
      pollId - the ID of the poll the user tried to vote
      userId - the ID of the user who is already voted in