# Error: Failed to handle signup webhook

**URL:** <https://answers.netlify.com/t/error-failed-to-handle-signup-webhook/27469>\
**Category:** Support\
**Tags:** identity\
**Created:** [December 1, 2020, 9:00pm UTC](https://answers.netlify.com/t/error-failed-to-handle-signup-webhook/27469 "2020-12-01T21:00:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ghughes13](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/ghughes13/32/17476_2.png) [@ghughes13](https://answers.netlify.com/u/ghughes13)\
**Post date:** [December 1, 2020, 9:00pm UTC](https://answers.netlify.com/t/error-failed-to-handle-signup-webhook/27469/1 "2020-12-01T21:00:57Z")

</div>

// [https://selftaught-dev.com/](https://selftaught-dev.com/)  
happy-hugle-97373a  
// [GitHub - ghughes13/SelfTaughtDev](https://github.com/ghughes13/Portfolio-v2)

Did Netlify have any big updates/changes in the past few days? The most recent thing I can find ([News & Announcements | Netlify Blog](https://www.netlify.com/topics/news/)) is from the 18th.

I’m using Netlify identity to let users sign up on my site. Haven’t had any issues with it until recently. The most recent sign up is from 3 days ago and now when anyone tries to sign up they get a “failed to handle signup webhook” error and a 422 error in the console. The build I’ve been using is from a month ago so I haven’t made any recent changes to the code. Anyone have any ideas what might have changed to cause this?

---

<div class="post-metadata">

**Author:** ![ghughes13](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/ghughes13/32/17476_2.png) [@ghughes13](https://answers.netlify.com/u/ghughes13)\
**Post date:** [December 1, 2020, 11:51pm UTC](https://answers.netlify.com/t/error-failed-to-handle-signup-webhook/27469/2 "2020-12-01T23:51:11Z")

</div>

Ahh apparently it’s looking for a file called “signup.js” instead of “identity-signup.js” now. After renaming it to ‘signup.js’ in my functions folder, it worked.

---

<div class="post-metadata">

**Author:** ![hemond.colby](https://avatars.discourse-cdn.com/v4/letter/h/71c47a/32.png) [@hemond.colby](https://answers.netlify.com/u/hemond.colby)\
**Post date:** [February 19, 2021, 5:03pm UTC](https://answers.netlify.com/t/error-failed-to-handle-signup-webhook/27469/3 "2021-02-19T17:03:06Z")

</div>

Unfortunately just changing the name of the file from “identity-signup.js” to “signup.js” didn’t work for me. However, my scenario is different in the fact that I am working on implementing identity-functions and did not previously have them implemented when I received the “Error: Failed to handle signup webhook” error. Therefore, I am leaving this here in case someone finds this thread because they are in the same situation as I was.

Here is what my issue was:

I was implementing “identity-validate.js” to perform some validation during sign up to prevent certain users from creating an account. I used the below code(removed and changed some values so it may not work with a copy paste) to test out what the error process would look like:

```
exports.handler = function (event, context, callback) {
const data = JSON.parse(event.body);
const { user } = data;

if (data.user.email == 'foo@foobar.com') {
    return callback(null, {
                statusCode: 400,
                body: JSON.stringify(responseBody)
            });
}
};

```

This was returning the “Error: Failed to handle signup webhook” error directly in the signup form. And the network was showing “signup” with a 422 response code (which was different than the 400 I set in my function).

I didn’t think much of it and just wanted a more descriptive error message, which lead me to this post, [Passing errors with Identity trigged functions](https://answers.netlify.com/t/passing-errors-with-identity-trigged-functions/1881/4), where issue, [Passing error messages from Identity triggered webhooks to client #212](https://github.com/netlify/gotrue/issues/212), was opened with the GoTrue API. Which let me know that I can get a custom error message to be returned.

I was still slightly confused why it was only “signup” in the error, and thought there had to be more to the process, so I figured I had to implement the “identity-signup.js” function as well. That didn’t change the error at all, which led me to this post that you’re on. I tried changing the file name as suggested, which did not work.

I decided to use my brain a little more and search for the “Error: Failed to handle signup webhook” string in the [GoTrue API](https://github.com/netlify/gotrue/blob/master/api/hooks.go#L137), and it turns out that that string is returned for just about any error.

Hope this rambling helps save someone some time.

---

<div class="post-metadata">

**Author:** ![hillary](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/hillary/32/21132_2.png) [@hillary](https://answers.netlify.com/u/hillary)\
**Post date:** [March 3, 2021, 3:11pm UTC](https://answers.netlify.com/t/error-failed-to-handle-signup-webhook/27469/4 "2021-03-03T15:11:40Z")

</div>

Hey there, @hemond.colby 👋

Thank you for sharing this series of steps with the Netlify Forums! It will be very helpful for any other individual who may find themselves facing a similar situation.

---

<div class="post-metadata">

**Author:** ![aoloo](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/aoloo/32/33744_2.png) [@aoloo](https://answers.netlify.com/u/aoloo)\
**Post date:** [January 28, 2022, 9:47pm UTC](https://answers.netlify.com/t/error-failed-to-handle-signup-webhook/27469/5 "2022-01-28T21:47:05Z")

</div>

Did you resolve this issue?

---

<div class="post-metadata">

**Author:** ![hrishikesh](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/hrishikesh/32/74607_2.png) [@hrishikesh](https://answers.netlify.com/u/hrishikesh)\
**Post date:** [January 30, 2022, 2:16pm UTC](https://answers.netlify.com/t/error-failed-to-handle-signup-webhook/27469/6 "2022-01-30T14:16:04Z")

</div>

Hey @aoloo,

Instead of replying in all the old threads, it would be great if you can create a new thread with all the relevant details.

EDIT: Please continue in your own thread here:

> [@422: Failed to handle signup webhook](https://answers.netlify.com/t/422-failed-to-handle-signup-webhook/50934/):
>
> Hi, I have seen support topics related to this issue, but I am unable to find a solution. I had set an identity notifcation to signup in the netlify UI. I pasted my serverless function url to get triggered when new users signs up and verifies their account. This is my function. exports.handler = async (event, context) =\> { try { console.log(event.body); return { statusCode: 200, }; } catch (err) { return { statusCode: 500, body: err.toString() }; } }; I do not thi…
