From 8a0fa8afd645bf939f0771d746ad8a89bd6e648c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Mon, 4 Jul 2016 13:19:02 +0200 Subject: [PATCH] Log error when unable to create new user in mongodb. --- pillar/application/modules/blender_id.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pillar/application/modules/blender_id.py b/pillar/application/modules/blender_id.py index 29002207..7dfbe680 100644 --- a/pillar/application/modules/blender_id.py +++ b/pillar/application/modules/blender_id.py @@ -87,6 +87,11 @@ def validate_create_user(blender_id_user_id, token, oauth_subclient_id): attempted_eve_method = 'POST' r, _, _, status = post_internal('users', db_user) + if status not in {200, 201}: + log.error('Status %i trying to create user for BlenderID %s with values %s: %s', + status, blender_id_user_id, db_user, r) + return abort(500) + db_id = r['_id'] db_user.update(r) # update with database/eve-generated fields.