Skip to content

Commit c890a99

Browse files
committed
fix(fathom): log a failed orphan webhook delete
1 parent 96ea47b commit c890a99

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

‎apps/sim/lib/webhooks/providers/fathom.ts‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,16 @@ async function deleteOrphanedFathomWebhook(
2323
): Promise<void> {
2424
if (!validateAlphanumericId(fathomWebhookId, 'Fathom webhook ID', 100).isValid) return
2525
try {
26-
await outboundFetch(`https://api.fathom.ai/external/v1/webhooks/${fathomWebhookId}`, {
27-
method: 'DELETE',
28-
headers: { 'X-Api-Key': apiKey },
29-
})
26+
const response = await outboundFetch(
27+
`https://api.fathom.ai/external/v1/webhooks/${fathomWebhookId}`,
28+
{ method: 'DELETE', headers: { 'X-Api-Key': apiKey } }
29+
)
30+
if (!response.ok && response.status !== 404) {
31+
logger.warn('Failed to remove orphaned Fathom webhook; it may still be active', {
32+
requestId,
33+
status: response.status,
34+
})
35+
}
3036
} catch (error) {
3137
logger.warn('Failed to remove orphaned Fathom webhook; it may still be active', error, {
3238
requestId,

0 commit comments

Comments
 (0)