# Pre registration hook - extensibility error

**URL:** <https://community.auth0.com/t/pre-registration-hook-extensibility-error/70079>\
**Category:** Get Help\
**Created:** [September 22, 2021, 10:55am UTC](https://community.auth0.com/t/pre-registration-hook-extensibility-error/70079 "2021-09-22T10:55:52Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![sai.krishna](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sai.krishna/32/12846_2.png) [@sai.krishna](https://community.auth0.com/u/sai.krishna)\
**Post date:** [September 22, 2021, 10:55am UTC](https://community.auth0.com/t/pre-registration-hook-extensibility-error/70079/1 "2021-09-22T10:55:52Z")

</div>

I have created pre registration hook and called out internal api to validate user but Its not allowing to create user after api successfully validated.

The following is the network call from browser developer tool

[https://pearl-dev.eu.auth0.com/dbconnections/signup](https://pearl-dev.eu.auth0.com/dbconnections/signup)

{“name”:“InternalExtensibilityError”,“statusCode”:400,“code”:“extensibility\_error”,“message”:“Extensibility error”,“description”:“Extensibility error”,“fromSandbox”:true}

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [September 22, 2021, 9:25pm UTC](https://community.auth0.com/t/pre-registration-hook-extensibility-error/70079/3 "2021-09-22T21:25:47Z")

</div>

Hi @sai.krishna,

Welcome to the Auth0 Community!

This suggests there is an error from an extensibility tool like hooks. You should be able to see the logs by following this guide:

> **[View Logs for Hooks](https://auth0.com/docs/customize/hooks/view-logs-for-hooks)**
>
> Learn how to view logs for hooks using the Auth0 Dashboard.

You may also want to consider using an [Action](https://auth0.com/docs/actions) instead of a hook, as Actions will eventually replace hooks.

---

<div class="post-metadata">

**Author:** ![sai.krishna](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sai.krishna/32/12846_2.png) [@sai.krishna](https://community.auth0.com/u/sai.krishna)\
**Post date:** [September 24, 2021, 7:20am UTC](https://community.auth0.com/t/pre-registration-hook-extensibility-error/70079/4 "2021-09-24T07:20:25Z")

</div>

Hi Dan,

I have tried Action instead of hook and it is working as intended.

Thanks

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [September 27, 2021, 3:23pm UTC](https://community.auth0.com/t/pre-registration-hook-extensibility-error/70079/5 "2021-09-27T15:23:28Z")

</div>

Great, let us know if you have any other questions.

---

<div class="post-metadata">

**Author:** ![sai.krishna](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sai.krishna/32/12846_2.png) [@sai.krishna](https://community.auth0.com/u/sai.krishna)\
**Post date:** [September 30, 2021, 8:00am UTC](https://community.auth0.com/t/pre-registration-hook-extensibility-error/70079/6 "2021-09-30T08:00:22Z")

</div>

Hi Dan,

we are getting error in pre user registration action if we use the following code as mentioned in the document

exports.onExecutePreUserRegistration = async (event, api)

```auto
error:
"code": 400,
"error": "Script returned an error.",
"details": "Error: No function found. Make sure you export it using \"module.exports = async function(event, context) { }\"",
"name": "Error",
"message": "No function found. Make sure you export it using \"module.exports = async function(event, context) { }\"",
"stack": "Error: No function found. Make sure you export it using \"module.exports = async function(event, context) { }\"\n at module.exports (/data/io/node12/7d13bcb6-24dc-4a4a-b8dc-b5a17c66fe13/webtask.js:159:7)\n at v1WebtaskWrapper (/data/io/65321e3f93af0d589dc791c85863346264b58e5d.js:121:16)\n at Async.waterfall.Errors.create.code (/data/sandbox/lib/sandbox.js:617:25)\n at nextTask (/data/sandbox/node12/node_modules/async/dist/async.js:5324:14)\n at next (/data/sandbox/node12/node_modules/async/dist/async.js:5331:9)\n at /data/sandbox/node12/node_modules/async/dist/async.js:969:16\n at /data/sandbox/lib/sandbox.js:496:22\n at /data/sandbox/lib/sandbox.js:704:16\n at invokeCallback (/data/sandbox/node12/node_modules/raw-body/index.js:224:16)\n at done (/data/sandbox/node12/node_modules/raw-body/index.js:213:7)"

```

if we make change the function as in error says its working  
module.exports = async (event, api)

why so? anything I missed, please suggest.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [September 30, 2021, 5:43pm UTC](https://community.auth0.com/t/pre-registration-hook-extensibility-error/70079/7 "2021-09-30T17:43:19Z")

</div>

Can you please DM me your tenant name?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [October 5, 2021, 5:57pm UTC](https://community.auth0.com/t/pre-registration-hook-extensibility-error/70079/8 "2021-10-05T17:57:03Z")

</div>

If I try to recreate, I get an error when using `module.exports`, and everything is fine with the standard `exports.onExecutePreUserRegistration`. Are you getting the error if you use the test functionality in the editor, or in the log if you have a use sign up?

---

<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:** [October 20, 2021, 5:57pm UTC](https://community.auth0.com/t/pre-registration-hook-extensibility-error/70079/9 "2021-10-20T17:57:59Z")

</div>

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