Post User Registration Axios Error - ERR_BAD_RESPONSE maxContentLength size of -1 exceeded

I’ve encounter the Axios Error from the Axios response in regard of the maxContentLength. I’ve tried to set to 100000, but it still encounter the same error. The API endpoint has successfully hit and endpoint get no error. No error in the Action debug test as well. Only happens when it runs in the Post User registration flow.

const axios = require("axios");

* Handler that will be called during the execution of a PostUserRegistration flow.
* @param {Event} event - Details about the context and user that has registered.
exports.onExecutePostUserRegistration = async (event) => {
  const user = {
    username: event.user.username ??,
    firstName: event.user.given_name,
    lastName: event.user.family_name,
    authProviderUserId: event.user.user_id

  const baseUrl = "<baseUrl>";

  await`${baseUrl}/users`, user, {
    headers: {
      'Content-Type': 'application/json',

Failed Post User Registration Hook

  • Description
    AxiosError on post-user-registration: ERR_BAD_RESPONSE maxContentLength size of 100000 exceeded

Hi @Vince.L,

Welcome to the Auth0 Community!

I understand that you have encountered an error with your Post User Registration Action.

Firstly, I suggest using the Auth0 Real-time Webtask Logs Extension to debug your Axios request.

It may be worth printing out the user object to verify that the values are correct.

Please let me know how this goes.

Thank you.