Mongodb exception handled