The JADE 2022 release meets tomorrow’s business demands.
When a duplicate key exception occurs, we're currently able to identify what the duplicate object is because of where the exception is raised. For JADE 2020 & beyond, this kind of exception could be raised by commitTransaction when the collection update has been deferred.
Ideally, Exception::errorObject would return a reference to the duplicate whenever this kind of exception occurs.