Handling webhook failures
-
We realized that a webhook of ours, listening to user.create.complete events, has been logging failures for some time. We can see errors in the System Event Log in the form "Webhook [<url>] returned response code [500] when sending [UserCreateComplete] event with Id [<uuid>]". The url is the endpoint listening to events and the uuid appears to be a random ID for the event.
The problem we are facing is not that the original webhook failed (we think we may know what the issue was with our endpoint), but that we have no idea which users it failed for and can't rectify the situation. The error logs don't contain any actionable information and we can't find any webhook event history in the FusionAuth dashboard or the database.
Is there any way to get the id of the user that triggered the webhook that failed? Or is there any way for us to replay a failed webhook after the 3 retries are up? Or can we configure more retries over a longer period?
-
@elliotdickison This looks similar to issue 2440.
After looking at the docs can you use the "random ID for the event" to look it up on the Webhook log and view the source to get the user ID?
-
@stefan-0 I tried to test this out on my own. I set up a webhook that I know worked, then changed the url so it would fail. Here is the log from the failed attempt.
Then I go to the Webhook log and see:
If I dig into the one that failed, I see:
Notice the ID in the general event is:
Id [9f9faf2d-7d32-48ce-98ee-76a31c43cac2]And in the source of the Webhook Log, you see the id is:
"id" : "9f9faf2d-7d32-48ce-98ee-76a31c43cac2"Hope this helps.