1 package net.avcompris.commons3.api.exception; 2 3 import javax.annotation.Nullable; 4 5 public final class UsernameAlreadyExistsException extends ServiceException { 6 7 private static final long serialVersionUID = -8823526456548125731L; 8 9 public UsernameAlreadyExistsException(@Nullable final String username) { 10 11 super(409, "Username already exists in the database: " + username); 12 } 13 14 public UsernameAlreadyExistsException(@Nullable final String username, @Nullable final Throwable cause) { 15 16 super(409, "Username already exists in the database: " + username, cause); 17 } 18 }