Be less specific on what exception class to expect for uniqueness violations.