Skip to content

lead-ingestion-failed

Source of truth: packages/notifications/src/translations.ts

DomainChannelsRecipients
systemin-app + emailAll platform admins
SourceContext
apps/worker/src/leads.ts:581notifyAdminsOfDlqWrite
export interface LeadIngestionFailedData {
/** A code, never a message — see {@link LEAD_INGESTION_ERROR_CODES}. */
errorCode: LeadIngestionErrorCode;
jobId: string | null;
failedIngestionId: string;
adminUrl: string;
}

The caller invokes triggerWorkflow('lead-ingestion-failed', recipientIds, data) where data is the LeadIngestionFailedData shape above. The server pre-translates the payload via getTranslatedPayload('lead-ingestion-failed', recipientLocale, data) from @repo/notifications before sending, producing { inAppBody, emailSubject, emailBody } for the dashboard templates to render.

Knock dashboard template body: {{ inAppBody }}.

LocalePreview source
es🚨 Falló la ingesta de un lead: ${LEAD_INGESTION_ERROR_LABELS.es[p.errorCode]}
en🚨 Lead ingestion failed: ${LEAD_INGESTION_ERROR_LABELS.en[p.errorCode]}

Subject: {{ emailSubject }}. Body: {{ emailBody }} (HTML mode, dashboard escaping OFF — every user-supplied string is escaped server-side via escapeHtml from @repo/notifications).

LocaleSubject preview
esFalla en ingesta de leads
enLead ingestion failure

Email body is composed by emailBody.es in packages/notifications/src/translations.ts via the layout components in packages/notifications/src/email-layout.ts (wrapEmailLayout, ctaButton, calloutBox, quoteBlock, propertyCard, detailTable / detailRow). Body source is not inlined here because it spans tens of lines per locale — open the source file for the full template.