diff options
author | drebs <drebs@leap.se> | 2016-11-22 18:17:55 -0200 |
---|---|---|
committer | drebs <drebs@leap.se> | 2016-11-22 18:21:29 -0200 |
commit | bb3cc25758e7c97285195eadedb81f59a6829bec (patch) | |
tree | 4fb2a33c8afeaccd746672353340c96e4fe87f44 /common/src/leap | |
parent | a37333302801fcc4039897839f021ba127c9b846 (diff) |
[feat] improve missing couch config doc error logging
Diffstat (limited to 'common/src/leap')
-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): |