Skip to content

Commit

Permalink
fix: allow null failureReason in failed sync events (#13429)
Browse files Browse the repository at this point in the history
  • Loading branch information
chandlerprall committed Aug 6, 2024
1 parent b7a655b commit eeda007
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,18 @@ export const SyncFailEventItem: React.FC<SyncFailEventItemProps> = ({ syncEvent
const failureUiDetails = failureUiDetailsFromReason(syncEvent.summary.failureReason, formatMessage);
const jobStatus = getStatusByEventType(syncEvent.eventType);

if (!failureUiDetails) {
return null;
}

return (
<ConnectionTimelineEventItem>
<ConnectionTimelineEventIcon icon="sync" statusIcon={getStatusIcon(jobStatus)} />
<ConnectionTimelineEventSummary>
<Text bold>
<FormattedMessage id={titleId} />
</Text>
<Box pt="xs" className={styles.details}>
<JobFailureDetails failureUiDetails={failureUiDetails} />
</Box>
{failureUiDetails && (
<Box pt="xs" className={styles.details}>
<JobFailureDetails failureUiDetails={failureUiDetails} />
</Box>
)}
</ConnectionTimelineEventSummary>
<ConnectionTimelineEventActions
createdAt={syncEvent.createdAt}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const syncFailureEventSummarySchema = yup.object({
bytesLoaded: yup.number().optional(),
recordsLoaded: yup.number().optional(),
jobId: yup.number().required(),
failureReason: jobFailureReasonSchema.required(),
failureReason: jobFailureReasonSchema.nullable(),
});

export const refreshEventSummarySchema = yup.object({
Expand Down

0 comments on commit eeda007

Please sign in to comment.