getUser(byEmail) is called before the create script for custom databases.
It was already reported here: Try-create script not working - #3 by anthony.r.dipasquale, but it looks like it’s still missing from the documentation.
I advise to add a small sentence after the “This script will be executed when the user signs up.” description.
What’s the expected return of getUser when no user matches? I now return null instead of an error (I tried both string and Object errors, they all block the call to create).
I just want to make sure that we following the Auth0’s best practices.