This article refers to Minecraft: Java Edition usernames.
When signing up for an account and creating a username you may see this error: IllegalArgumentException: Registration failed.
This error occurs when a registered account already exists with the username you have selected. Normally the site will tell you the name is already taken, but in some instances, this error will show instead. You will need to select a new username and try again.
If you are still having issues selecting a unique name, please contact Minecraft support.