Post-Registration action fails causing user to not be created

I have an action for Post-Registration, that sends me the user’s auth0 id and email so I can then store them in my database. Sometimes the action fails, but I still get the user in my database with an auth0 id and email, but they do not show up in Auth0. I am confused on how this occurs. Shouldn’t the action only run after the user has been registered in Auth0?

Hi @jordansh,

Thanks for reaching out to the Auth0 Community!

Yes, the Post-User Registration Action executes after a user successfully registers onto your application.

Given that the issue happens intermittently, could you please clarify the error logs you get when the Action fails?

And could you please share your complete Post-User Registration Action script?

Thank you.

const axios = require('axios');

exports.onExecutePostUserRegistration = async (event) => {
  const response = await'<api endpoint>', {
    auth0Id: event.user.user_id,
    key: xxxxxx

That is the action I run on the Post User Registration Flow.

I don’t see any error logs on my backend, and I cannot look back far enough in Auth0 for the error since I only get 24 hours of logs.

Hi @jordansh,

Thank you for your response.

There is nothing alarming about in your code. In this situation, could you please let me know if this issue is 100% reproducible?

Thank you.