catch pymongo.Connection error.