Serializers user signup: correctly handle EtebaseValidationErrors.

Don't coerce them to strings
master
Tom Hacohen 4 years ago
parent 7ab9513e05
commit 42a72ce5c7

@ -450,6 +450,8 @@ class AuthenticationSignupSerializer(BetterErrorsMixin, serializers.Serializer):
# Create the user and save the casing the user chose as the first name
try:
instance = create_user(**user_data, password=None, first_name=user_data['username'], view=view)
except EtebaseValidationError as e:
raise e
except Exception as e:
raise EtebaseValidationError('generic', str(e))

Loading…
Cancel
Save