Skip to content

Commit ba2e4cc

Browse files
authored
fix(fathom): skip getDocument when header cache is missing instead of emitting a degraded, un-refreshable record (#4859)
1 parent b58cd1f commit ba2e4cc

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

apps/sim/connectors/fathom/fathom.ts

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -498,18 +498,28 @@ export const fathomConnector: ConnectorConfig = {
498498
}
499499

500500
const header = readCachedHeader(syncContext, externalId)
501+
if (!header) {
502+
logger.warn(
503+
'No cached header for Fathom meeting; skipping to avoid an un-refreshable record',
504+
{
505+
externalId,
506+
}
507+
)
508+
return null
509+
}
510+
501511
const content = formatMeetingContent(header, transcript, summary).trim()
502512
if (!content) return null
503513

504514
return {
505515
externalId,
506-
title: header?.title ?? 'Untitled Fathom Meeting',
516+
title: header.title,
507517
content,
508518
contentDeferred: false,
509519
mimeType: 'text/plain',
510-
sourceUrl: header?.sourceUrl,
511-
contentHash: header?.contentHash ?? `fathom:${externalId}`,
512-
metadata: { ...(header?.metadata ?? { recordingId: externalId }) },
520+
sourceUrl: header.sourceUrl,
521+
contentHash: header.contentHash,
522+
metadata: { ...header.metadata },
513523
}
514524
} catch (error) {
515525
logger.warn('Failed to get Fathom meeting', {

0 commit comments

Comments
 (0)