Improve the message to user when MongoDB does not like index and unique constraint on field.

Description

Currently when a user attempts to define a unique constraint and an index on the same field in MongoDB an exception stack trace is displayed.
Instead of a stack trace a WARNING message would be better.

This has been discussed in a forum thread

https://discourse.hibernate.org/t/using-unique-constraint-and-index-on-field-with-mongodb/888

Environment

None

Status

Assignee

Fabio Massimo Ercoli

Reporter

Jeremy Whiting

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

Yes, likely

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Affects versions

Priority

Trivial
Configure