Mongo connection error handling