bbovenzi commented on code in PR #74131:
URL: https://github.com/apache/airflow/pull/74131#discussion_r4185505570


##########
airflow-core/src/airflow/ui/src/pages/XCom/XComEntry.tsx:
##########
@@ -76,6 +78,47 @@ export const XComEntry = ({ dagId, mapIndex, open = false, 
runId, taskId, xcomKe
     taskId,
     xcomKey,
   });
+
+  if (Boolean(error)) {
+    const apiError = error as Partial<ExpandedApiError>;
+    const detail = apiError.body?.detail;
+    const summary = typeof detail === "string" ? detail : apiError.message;
+
+    return (
+      <Popover.Root lazyMount unmountOnExit>
+        <Popover.Trigger asChild>
+          <Button
+            color="fg.error"
+            data-testid="xcom-entry-error"
+            fontSize="sm"
+            gap={1}
+            justifyContent="flex-start"
+            maxW="min(15rem, 40vw)"
+            minW={0}
+            px={0}
+            size="xs"
+            variant="plain"
+          >
+            <FiAlertCircle aria-hidden="true" />
+            {apiError.status === undefined ? undefined : (
+              <Text as="span" flexShrink={0}>
+                {apiError.status}
+              </Text>
+            )}
+            <Text as="span" minW={0} truncate>
+              {summary}

Review Comment:
   Thanks! Since the errors get cut off anyway. Let's just keep the short 
status and alert circle inline and only show the full error in the popover.
   
   Please also show a screenshot of the popover.
   
   Finally, we have a lot of hardcoded maxH and maxW sizes. If the errors are 
so large, then we should probably follow how we do DagImportErrors and create a 
new shared ErrorModal component. Then the UX will be more consistent for large 
error messages across the UI



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to