Currently the database name validity check happens outside of the try/catch block and it causes the server connection to be closed.
The resolution should be the same for both mongos and mongod.
Currently the database name validity check happens outside of the try/catch block and it causes the server connection to be closed.
The resolution should be the same for both mongos and mongod.