Skip to content

Commit 6e2cde7

Browse files
committed
fix(fathom): guard against undefined webhook id on creation success
1 parent 9bf87b4 commit 6e2cde7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

apps/sim/lib/webhooks/provider-subscriptions.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1447,6 +1447,13 @@ export async function createFathomWebhookSubscription(
14471447
throw new Error(userFriendlyMessage)
14481448
}
14491449

1450+
if (!responseBody.id) {
1451+
fathomLogger.error(
1452+
`[${requestId}] Fathom webhook creation returned success but no webhook ID for ${webhookData.id}.`
1453+
)
1454+
throw new Error('Fathom webhook created but no ID returned. Please try again.')
1455+
}
1456+
14501457
fathomLogger.info(
14511458
`[${requestId}] Successfully created webhook in Fathom for webhook ${webhookData.id}.`,
14521459
{

0 commit comments

Comments
 (0)