-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
fix(aci): Gracefully handle missing actions in Alerts UI #112070
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -62,7 +62,8 @@ export function ActionNodeList({ | |
| onDeleteRow, | ||
| updateAction, | ||
| }: ActionNodeListProps) { | ||
| const {data: availableActions = []} = useAvailableActionsQuery(); | ||
| const {data: availableActions = [], isLoading: isLoadingActions} = | ||
| useAvailableActionsQuery(); | ||
| const {errors, removeError} = useAutomationBuilderErrorContext(); | ||
| const {connectedDetectors} = useConnectedDetectors(); | ||
|
|
||
|
|
@@ -110,9 +111,33 @@ export function ActionNodeList({ | |
| return ( | ||
| <Fragment> | ||
| {actions.map(action => { | ||
| if (isLoadingActions) { | ||
| return null; | ||
| } | ||
| const handler = getActionHandler(action, availableActions); | ||
| if (!handler) { | ||
| return null; | ||
| const actionLabel = actionNodesMap.get(action.type)?.label; | ||
| return ( | ||
| <AutomationBuilderRow | ||
| key={`actionFilters.${conditionGroupId}.action.${action.id}`} | ||
| onDelete={() => { | ||
| onDeleteRow(action.id); | ||
| }} | ||
| hasError | ||
| errorMessage={ | ||
| actionLabel | ||
| ? t( | ||
| 'The %s action is no longer available. Please remove and reconfigure this action.', | ||
| actionLabel | ||
| ) | ||
| : t( | ||
| 'The integration is no longer available. Please remove and reconfigure this action.' | ||
| ) | ||
| } | ||
| > | ||
| {actionLabel ?? t('Unknown integration')} | ||
| </AutomationBuilderRow> | ||
| ); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. API failure misreported as permanently unavailable actionsMedium Severity When the Reviewed by Cursor Bugbot for commit 81a7f88. Configure here. |
||
| } | ||
| const error = errors?.[action.id]; | ||
| const warningMessage = getIncompatibleActionWarning(action, { | ||
|
|
||


Uh oh!
There was an error while loading. Please reload this page.