Handle mongo connection errors