Serializers user signup: correctly handle EtebaseValidationErrors.
Don't coerce them to strings
This commit is contained in:
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…
Reference in New Issue
Block a user