From bb3cc25758e7c97285195eadedb81f59a6829bec Mon Sep 17 00:00:00 2001 From: drebs Date: Tue, 22 Nov 2016 18:17:55 -0200 Subject: [feat] improve missing couch config doc error logging --- common/src/leap/soledad/common/couch/state.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'common/src') diff --git a/common/src/leap/soledad/common/couch/state.py b/common/src/leap/soledad/common/couch/state.py index 523ac0b0..a7f5b7b6 100644 --- a/common/src/leap/soledad/common/couch/state.py +++ b/common/src/leap/soledad/common/couch/state.py @@ -101,10 +101,15 @@ class CouchServerState(ServerState): config_doc = db.get(CONFIG_DOC_ID) if config_doc: if config_doc[SCHEMA_VERSION_KEY] != SCHEMA_VERSION: + logger.error( + "Unsupported database schema in database %s" % dbname) raise WrongCouchSchemaVersionError(dbname) else: result = db.view('_all_docs', limit=1) if result.total_rows != 0: + logger.error( + "Missing couch config document in database %s" + % dbname) raise MissingCouchConfigDocumentError(dbname) def open_database(self, dbname): -- cgit v1.2.3