diff options
author | drebs <drebs@leap.se> | 2016-11-22 18:17:55 -0200 |
---|---|---|
committer | drebs <drebs@leap.se> | 2016-11-22 18:17:55 -0200 |
commit | 3ad3241cb21390923e551959829f0af98dd7ad34 (patch) | |
tree | 7d3b1046c86c34b0f38ac6fa23755a1f277b9189 /common/src | |
parent | e97239048adde8947eea54e0d121d0abbbd18d2d (diff) |
[feat] improve missing couch config doc error logging
Diffstat (limited to 'common/src')
-rw-r--r-- | common/src/leap/soledad/common/couch/state.py | 5 |
1 files changed, 5 insertions, 0 deletions
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): |