Display the error code within Atlas UI if an index fails
When creating an index via the Atlas UI, the interface currently does not display the error code if the index build fails. This lack of visibility makes it difficult for customers to understand the cause of failure without contacting support.
This limitation is particularly impactful for unique index creation. In these cases, mongod validates constraints only at the end of the build process. If duplicate keys are found, the index build fails after consuming significant time and resources — but the Atlas UI does not surface the underlying E11000 duplicate key error (or other relevant error codes).
If I submit an index creation from mongosh, it will display that "index build has failed" along with the error code as shown below.
[primary] samplemflix> db.comments.createIndex({ email: 1 }, { unique: true })
MongoServerError[DuplicateKey]: Index build failed: b691a5ae-895b-42cf-bcf6-7d0f751b0c4f: Collection samplemflix.comments ( b1d9a6f4-5e6a-44ce-ac6a-b6351c73b952 ) :: caused by :: E11000 duplicate key error collection: samplemflix.comments index: email1 dup key: { email: null }
If the Atlas UI were able to display the specific error code and message directly, application teams would immediately see that the failure was due to duplicate keys (or another constraint violation), saving time and reducing dependency on support.
