Is there a tool to verify the outcomes of webhooks, not just their delivery?

0
4
Asked By TechieTurtle84 On

I've been facing issues with webhooks where they seem to fire correctly and return a 200 status, indicating success. However, the actual intended actions sometimes fail without any notification—like emails not being sent, database updates not occurring, or failures in downstream APIs. Most tools I've encountered, such as Stripe and various queue systems, primarily focus on delivery and retries but do not verify if the desired outcome actually happened. Is there any existing tool that checks the results of a webhook execution, or do most people rely on creating their own custom reconciliation logic? I'd appreciate any feedback or suggestions!

2 Answers

Answered By DreamerDude72 On

Unfortunately, webhooks can't do that. When you set up a webhook, you're the one who decides the response when the hook is triggered. If you send a 200 status back, that’s all the sender knows—they are unaware of any downstream issues. It's really up to your system to handle those kinds of failures.

QuickThoughts87 -

Maybe you could send a 202 response if the request hasn’t been fully completed yet and needs more processing?

Answered By LogicLover21 On

One common approach that many teams use is establishing a delayed verification job. After accepting the 200 response, they queue the event and have a separate worker check the actual state after about 30-60 seconds. If there's a mismatch from what you expected, an alert is triggered. For emails, services like Postmark and SendGrid offer their own delivery webhooks that confirm if the email was actually sent. However, for database updates and downstream API calls, custom logic is still required because they vary too much by use case. If this issue keeps arising, you might also want to check out the 'outbox pattern', which involves writing the intent to a local database before executing the action and marking it complete afterward. This way, you can catch any pending actions that haven't completed after a certain time, instead of waiting on the webhook sender.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.