From 85d6f760004c5a83d2087f28a5a4b11a54f770b8 Mon Sep 17 00:00:00 2001 From: Stephan Preeker Date: Fri, 29 Dec 2017 17:08:34 +0100 Subject: [PATCH] better error reporting --- pillar/api/search/documents.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pillar/api/search/documents.py b/pillar/api/search/documents.py index 7ec43454..c9b01daa 100644 --- a/pillar/api/search/documents.py +++ b/pillar/api/search/documents.py @@ -126,7 +126,7 @@ def create_doc_from_user_data(user_to_index: dict) -> User: if not doc_id: log.error('USER ID is missing %s', user_to_index) - raise KeyError + raise KeyError('Trying to create document without id') doc = User(_id=doc_id) doc.objectID = str(user_to_index['objectID'])