:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(subscriptions): show failure reason in delivery history tooltip (#59916)
Matt Puaca6ef065d1b7
diff --git a/frontend/src/scenes/subscriptions/components/SubscriptionDeliveryHistory.tsx b/frontend/src/scenes/subscriptions/components/SubscriptionDeliveryHistory.tsxindex 3fb28075c4f0..c2826001ef77 100644--- a/frontend/src/scenes/subscriptions/components/SubscriptionDeliveryHistory.tsx+++ b/frontend/src/scenes/subscriptions/components/SubscriptionDeliveryHistory.tsx@@ -1,5 +1,13 @@import { IconSend } from '@posthog/icons'-import { LemonButton, LemonDivider, LemonSelect, LemonTable, LemonTableColumns, LemonTag } from '@posthog/lemon-ui'+import {+ LemonButton,+ LemonDivider,+ LemonSelect,+ LemonTable,+ LemonTableColumns,+ LemonTag,+ Tooltip,+} from '@posthog/lemon-ui'import { TZLabel } from 'lib/components/TZLabel'@@ -20,10 +28,10 @@ import { TARGET_TYPE_LABEL } from './subscriptionLabels'type DeliveryListStatusFilter =(typeof SubscriptionDeliveriesListStatusByValue)[keyof typeof SubscriptionDeliveriesListStatusByValue]-function deliveryStatusTag(status: SubscriptionDeliveryApi['status']): JSX.Element {+function deliveryStatusTag(row: SubscriptionDeliveryApi): JSX.Element {let label: stringlet tagType: 'success' | 'danger' | 'warning' | 'default'- switch (status) {+ switch (row.status) {case SubscriptionDeliveryStatusEnumApi.Starting:label = 'Starting'tagType = 'default'@@ -41,9 +49,23 @@ function deliveryStatusTag(status: SubscriptionDeliveryApi['status']): JSX.ElemetagType = 'warning'breakdefault:- label = status+ label = row.statustagType = 'default'}+ const failureMessage = (row.error as { message?: unknown } | null)?.message+ if (+ row.status === SubscriptionDeliveryStatusEnumApi.Failed &&+ typeof failureMessage === 'string' &&+ failureMessage+ ) {+ return (+ <Tooltip title={failureMessage}>+ <LemonTag type={tagType} className="cursor-help">+ {label}+ </LemonTag>+ </Tooltip>+ )+ }return <LemonTag type={tagType}>{label}</LemonTag>}@@ -114,7 +136,7 @@ function buildDeliveryColumns(): LemonTableColumns<SubscriptionDeliveryApi> {title: 'Status',key: 'status',className: DELIVERY_TABLE_CELL_CLASS,- render: (_v, row) => deliveryStatusTag(row.status),+ render: (_v, row) => deliveryStatusTag(row),},{title: 'Trigger',