The server ends the transaction because the key is already defined in the database.
Server operation continues.
Make sure the key is unique.