I created a custom action so when a new user registers I create a user doc in my apps database.
During my test of the action it worked and the test data was saved to my database… but what happens if there is an error in my action?
I don’t know how to handle the error?
The ultimate goal of my action to to create the user doc and attach the userId in my database onto the Auth0 user metadata so when I make calls to my api… it’s super easy to query my database.
I am guessing if creating the user document in the action errors out for some reason… I can attach an empty string or null to the Auth0 user metadata.
When I get the user in my app, I can check for null and if null… prompt them that there was an error and they need to finish creating their account… and handle this with my own api and the user management api in Auth0 to add the userId to the user metadata.
Is this the “correct” why to handle an error?
Or do errors kill the action?