8
Skayo
6y

Debugging webhooks is so fucking hard. Took me the whole day...

Comments
  • 2
    Webhooks in general are just one step further into webdev hell.
  • 1
    Write tests?
  • 1
    <@tacyarg>
    But writing tests wasn't really helpful at this point.
  • 2
    It's always helpful, even if your code is "working".
  • 1
    What's hard about that? No matter how I look at it, both sides of a webhook should be easy to test.

    Sending side? Mock the input that is supposed to throw the hook, test that the hook is sent

    Receiving side? Mock the webhook call and ensure the hook is doing what it's supposed to.

    I can see a problem with getting the webhook call correct if documentation is bad though.
Add Comment