<@U011D3UQKNY> I've read some place that the webho...
# talk-kratos
r
@User I've read some place that the webhooks have no retry method and that they don't think kratos should handle that. Just curious as to what would happen if a server that the webhook is sending to is not up, would it just fail silently?
p
AFAIK there is no retry mechanism.
m
Failed hook requests should be stored in the database, but I am not sure if it is implemented, if so not documented. Maybe you can confirm quickly @proud-plumber-24205?
p
No we do not store the failed request in the database. When the webhook fails it does not retry. You can see it here: https://github.com/ory/kratos/blob/51b131177c9e0db018eced939fef43742c9e86cf/selfservice/hook/web_hook.go#L248-L270 Also see this note on the docs
As of today Web-Hooks cannot control the execution of the flow by patching/updating particular properties of flow specific object upon Web-Hook completion. It will however cancel the execution of the flow if the call to the Web-Hook end point fails either due to a network error or if the end point responses with an HTTP code > 300.
The webhook will print the error to the kratos logs and the flow will probably also fail. The request might also then get redirected to the kratos error page with the error message.
I will need to test it to verify my assumptions of the redirect to the error page.
r
appreciate the response guys, so even though we have the after webhook, if it fails it will revert everything, i.e it will revert the registration of the user?
p
I would have to test that, the user should still be created though, but the session might not