Thanks for the invite! I'm trying to use a before...
# ory-selfhosting
b
Thanks for the invite! I'm trying to use a before webhook to enable/disable access to the Kratos registration flow. If I return 4xx from the webhook, the user gets sent to the error flow instead. So far, so good. Next I'd like to customise the error page to tell the user what went wrong. Such as, "Too many signups today, please try again tomorrow", or "Signups are blocked from your IP address". How can I pass an error identifier from the webhook to the error flow? I found the code at https://github.com/ory/kratos/blob/369aad447b9b668b596d9645ee48c24f6e41429c/selfservice/hook/web_hook.go#L478 - this seems to be focused on validation errors, that the user might be able to fix by resubmitting the form - but I want to fail from the 'before' hook, and block the registration flow entirely.