From 5276d960d62022ce1b31981a1ae421c6beb608ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 31 May 2016 13:37:39 +0200 Subject: [PATCH] Added some extra logging to find source of 'username not unique' errors. --- pillar/application/modules/blender_id.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pillar/application/modules/blender_id.py b/pillar/application/modules/blender_id.py index 2aed7170..40b6f8cc 100644 --- a/pillar/application/modules/blender_id.py +++ b/pillar/application/modules/blender_id.py @@ -79,6 +79,9 @@ def validate_create_user(blender_id_user_id, token, oauth_subclient_id): etag = {} r, _, _, status = put_internal('users', remove_private_keys(db_user), _id=db_id, **etag) + if status == 422: + log.error('Status %i trying to PUT user, should not happen! %s', + status, r) else: # Create a new user, retry for non-unique usernames. r = {}