Hey @happy.sisyphus, Welcome to the Auth0 Community!
To use the PreUserRegistrationError
class , you don’t need any additional import, the sample provided in the link shared by you should suffice. Based on the logic you are planning to implement you can directly use the class to throw the custom error.
This custom error functionality only works with New Login experience.
Regards,
Sidharth