<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Webhooks on Brian Faust</title><link>https://vacua.dev/tags/webhooks/</link><description>Recent content in Webhooks on Brian Faust</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Mon, 01 Jan 0001 00:00:00 +0000</lastBuildDate><atom:link href="https://vacua.dev/tags/webhooks/rss.xml" rel="self" type="application/rss+xml"/><item><title>A Webhook Delivery Is Not a Unique Event</title><link>https://vacua.dev/thoughts/a-webhook-delivery-is-not-a-unique-event/</link><pubDate>Tue, 01 May 2018 00:00:00 +0000</pubDate><guid>https://vacua.dev/thoughts/a-webhook-delivery-is-not-a-unique-event/</guid><description>&lt;p&gt;A subscription callback had already created this local record:&lt;/p&gt;
&lt;figure class="code-figure"&gt;
 &lt;div class="code-block" data-copy-code&gt;
 &lt;button class="copy-code" type="button" aria-label="Copy code"&gt;copy&lt;/button&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;carrier: external-freight
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;subscription_id: sub-demo-17
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;secret: old-secret
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;expires_at: 2018-05-08T12:00:00Z&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
 &lt;/div&gt;
&lt;/figure&gt;
&lt;p&gt;The sender delivered another validation message for &lt;code&gt;sub-demo-17&lt;/code&gt;, now with a
new secret and expiry. The handler tried to insert a second row. A unique
constraint rejected it, so the activation step never ran.&lt;/p&gt;
&lt;p&gt;The database was right. The handler had mistaken another delivery for another
subscription.&lt;/p&gt;
&lt;h2 id="start-with-the-identity-the-sender-repeated"&gt;Start with the identity the sender repeated&lt;/h2&gt;
&lt;p&gt;A webhook request is evidence that a message was delivered. It is not evidence
that this message has never arrived before.&lt;/p&gt;</description></item></channel></rss>