I’m trying to implement an email domain block list through Netlify Identity via the identity-validate
webhook. Currently, when an email address is from a bad domain, I return a 403 response. However, this results in this error on the front end:
According to this post, this error message is returned for just about any error. In this scenario, this error is misleading and can result in users repeatedly trying to sign up.
Looks like there’s a PR to allow us to pass custom error messages to the client, but that’s been inactive since 2019. How do we properly handle the identity-validate
webhook to return a custom 403 message instead of the user unfriendly “Failed to handle signup webhook”?