# 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:** 1\
**Showing post:** 3

<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.

---

_[View the full topic](https://answers.netlify.com/t/error-failed-to-handle-signup-webhook/27469)._
