Whats the newer version of com.mongodb.DuplicateKeyException?

Hi there,
We have recently upgraded MongoDB from v4.2 to 5.0
We have a collection that has a field by name ‘title’ to be unique. Java code has C (create operation), which is expected to throw DuplicateKeyException when a new document with duplicate ‘title’ is inserted.

This Exception is not thrown now and hence, posting here so that, someone can point me to the right Exception class (per version 5.0) .
is com.mongodb.DuplicateKeyException deprecated?
if so, what is the latest one.

Thank you. So, there is no change in this.