Displayed error message when duplicate key in database.