Sandbox Error: Internal server error for user creation

User creation through the Python lib is returning a 400 without any useful message. Looks like it might even be an upstream error. This is for a developer account.

>>> from import Auth0
>>> from apps.accounts.utils import auth0_mgmt_api_token
>>> from django.conf import settings
>>> client = Auth0(settings.AUTH0'domain'], auth0_mgmt_api_token())
>>> client.users.create({'connection': settings.AUTH0'connection'], 'email': '', 'password': 'test123'})
{'statusCode': 400, 'message': 'Sandbox Error: Internal server error', 'error': 'Bad Request'}

This in contrast to a similar request which helpfully shows what is wrong with the request:

>>> client.users.create({'connection': settings.AUTH0'connection'], 'email': ''})
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/env/lib/python3.5/site-packages/auth0/v3/management/", line 75, in create
    return, data=body)
  File "/env/lib/python3.5/site-packages/auth0/v3/management/", line 64, in post
    return self._process_response(response)
  File "/env/lib/python3.5/site-packages/auth0/v3/management/", line 111, in _process_response
auth0.v3.exceptions.Auth0Error: 400: Payload validation error: 'Missing required property: password'.

The SDK itself is just relaying information and in some situations there’s no more information to share, in particular, that’s a public endpoint so very detailed error information can also be a problem all by itself.

In relation to the underlying issue, the recommendation would be for you to check the possible root causes listed at this other similar question:

@jmangelo thanks! i believe there was an error with a pre-registration hook.

Unfortunately, i guess the hook is working fine, just that the underlying error message cannot propagate back to the response:

That’s a bummer.

@jmangelo thanks! i believe there was an error with a pre-registration hook.

Yes, that’s correct, if the hook was throwing an error intentionally at this time this will only be conveyed as an error without the possibility to provide specific information to distinguish root causes.