# PostUserRegistration: Script generated an unhandled asynchronous exception

**URL:** <https://community.auth0.com/t/postuserregistration-script-generated-an-unhandled-asynchronous-exception/8252>\
**Category:** Get Help\
**Tags:** post-user-registrati\
**Created:** [September 20, 2017, 6:11am UTC](https://community.auth0.com/t/postuserregistration-script-generated-an-unhandled-asynchronous-exception/8252 "2017-09-20T06:11:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rich.gwozdz](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@rich.gwozdz](https://community.auth0.com/u/rich.gwozdz)\
**Post date:** [September 20, 2017, 6:11am UTC](https://community.auth0.com/t/postuserregistration-script-generated-an-unhandled-asynchronous-exception/8252/1 "2017-09-20T06:11:29Z")

</div>

I can run this without problem in the in the editor, but when I create a new user through the Auth0 dashboard, it doesn’t work. All I get in Logs is a `Warning: ExtensibilityImplementationError on post-user-registration: Script generated an unhandled asynchronous exception.`

Here’s my hook code:

```
var request = require('request@2.82.0');

module.exports = function (user, context, cb) {

const url = 'https://url-where-I-post-my-user';
 
request({ 
  method: 'POST', 
  url: url, 
  json: true,
  body: {
      "user_id": user.user_id, 
      "username": user.username, 
      "role": user.app_metadata.role,
      "first_name": user.app_metadata.first_name,
      "last_name": user.app_metadata.last_name
    }, 
  },
  function(error, response, body) { 
    cb(error, response) 
  });
};

```

---

<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:** [March 2, 2018, 5:56am UTC](https://community.auth0.com/t/postuserregistration-script-generated-an-unhandled-asynchronous-exception/8252/2 "2018-03-02T05:56:36Z")

</div>


