Handling down mongo.

This commit is contained in:
Samuel Clay 2021-05-10 19:19:40 -04:00
parent 4d87b88022
commit 32e1395317

View file

@ -73,7 +73,11 @@ def db_check_mongo():
except:
abort(503)
stories = db.stories.count()
try:
stories = db.stories.count()
except pymongo.errors.NotMasterError:
abort(508)
if not stories:
abort(504)