# Trying to test a custom action from within the "Custom Actions" Development page. This used to work, and now all of the

**URL:** <https://community.auth0.com/t/trying-to-test-a-custom-action-from-within-the-custom-actions-development-page-this-used-to-work-and-now-all-of-the/98161>\
**Category:** Get Help\
**Tags:** extensibility, actions-extensibility\
**Created:** [January 13, 2023, 7:15pm UTC](https://community.auth0.com/t/trying-to-test-a-custom-action-from-within-the-custom-actions-development-page-this-used-to-work-and-now-all-of-the/98161 "2023-01-13T19:15:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![neel](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/neel/32/42646_2.png) [@neel](https://community.auth0.com/u/neel)\
**Post date:** [January 13, 2023, 7:15pm UTC](https://community.auth0.com/t/trying-to-test-a-custom-action-from-within-the-custom-actions-development-page-this-used-to-work-and-now-all-of-the/98161/1 "2023-01-13T19:15:27Z")

</div>

Trying to test a custom action from within the “Custom Actions” Development page. This used to work, and now all of the sudden, it is failing.

This is the error that is being returned. Looks like it is coming from Auth0 and not my code.

Error:  
{  
“message”: “Request failed with status code 500”,  
“name”: “Error”,  
“stack”: “Error: Request failed with status code 500\n at createError (/data/\_verquire/\_node16/axios/0.22.0/node\_modules/axios/lib/core/createError.js:16:15)\n at settle (/data/\_verquire/\_node16/axios/0.22.0/node\_modules/axios/lib/core/settle.js:17:12)\n at IncomingMessage.handleStreamEnd (/data/\_verquire/\_node16/axios/0.22.0/node\_modules/axios/lib/adapters/http.js:293:11)\n at IncomingMessage.emit (node:events:539:35)\n at IncomingMessage.emit (node:domain:537:15)\n at endReadableNT (node:internal/streams/readable:1345:12)\n at processTicksAndRejections (node:internal/process/task\_queues:83:21)”  
}

This is the code for the custom action:

/\*\*

- 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, api) =\> {

const axios = require(‘axios’);  
const https = require(‘https’);  
const MY\_CA\_BUNDLE = event.secrets.CA\_Bundle;

const httpsAgent = new https.Agent({  
rejectUnauthorized: false  
});  
const instance = axios.create({ httpsAgent })

const url = ‘https://MY\_URL/tester2/api/PostAuth0?emailAddress=’ + event.user.email + ‘&auth0Id=’ + event.user.user\_id + ‘&emailverified=’ + event.user.email\_verified + ‘&’;  
‘&userMetadata=’ + event.user.user\_metadata + ‘&’;

const options = {  
headers: {  
‘Content-Type’: ‘application/json’  
}  
};

const data = {

```
emailAddress: event.user.email

```

};

var response = await instance.post(url, data, options);  
console.log(response.data);  
};

I am down right now, can you help me figure it out. Thanks!

 ![image](https://global.discourse-cdn.com/auth0/original/3X/e/5/e56809c68f1b5364b1e3f484b246404baf750df0.jpeg)

---

<div class="post-metadata">

**Author:** ![neel](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/neel/32/42646_2.png) [@neel](https://community.auth0.com/u/neel)\
**Post date:** [February 8, 2023, 6:08pm UTC](https://community.auth0.com/t/trying-to-test-a-custom-action-from-within-the-custom-actions-development-page-this-used-to-work-and-now-all-of-the/98161/2 "2023-02-08T18:08:44Z")

</div>

I was to fix the issue it was a JSON.stringify issue.

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [February 9, 2023, 12:40am UTC](https://community.auth0.com/t/trying-to-test-a-custom-action-from-within-the-custom-actions-development-page-this-used-to-work-and-now-all-of-the/98161/3 "2023-02-09T00:40:10Z")

</div>

Hey @neel welcome to the community and thanks for following up with the solution 🙏✅

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [February 23, 2023, 12:40am UTC](https://community.auth0.com/t/trying-to-test-a-custom-action-from-within-the-custom-actions-development-page-this-used-to-work-and-now-all-of-the/98161/4 "2023-02-23T00:40:49Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
