bito-code-review[bot] commented on PR #43793:
URL: https://github.com/apache/superset/pull/43793#issuecomment-5512763005
<!-- Bito Reply -->
The flagged issue is correct. The `addNativeFilterOptions` function (which
appears to be the function containing the logic starting around line 1584 in
`AlertReportModal.tsx`) was previously missing a `.catch()` block for the
promise returned by `getChartDataRequest`, leading to unhandled rejections on
failure.
The fix implemented in the PR (lines 164-166 of the diff) correctly adds a
`.catch()` block to handle these failures and display the appropriate error
toast:
```typescript
.catch(() => {
addDangerToast(t('Failed to load dashboard filter values.'));
});
```
This ensures that if the async job fails, the user is notified via the
dashboard-filter error toast instead of encountering an unhandled promise
rejection.
**superset-frontend/src/features/alerts/AlertReportModal.tsx**
```
.catch(() => {
addDangerToast(t('Failed to load dashboard filter values.'));
});
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]