bito-code-review[bot] commented on PR #44958:
URL: https://github.com/apache/superset/pull/44958#issuecomment-5972594451
<!-- Bito Reply -->
The flagged issue is correct. The `fetchDatasourceMetadata` action returns a
promise, and the current implementation in `ExploreViewContainer/index.tsx`
does not handle potential rejections, which can lead to unhandled promise
rejections.
To resolve this, you should add a `.catch()` block to the promise returned
by the action. Here is the corrected implementation:
```tsx
props.actions.fetchDatasourceMetadata(props.form_data.datasource)
.catch((error: Error) => {
console.error('Failed to fetch datasource metadata:', error);
});
```
Since there are no other comments in the provided PR context, there are no
additional items to address.
**superset-frontend/src/explore/components/ExploreViewContainer/index.tsx**
```
props.actions.fetchDatasourceMetadata(props.form_data.datasource)
.catch((error: Error) => {
console.error('Failed to fetch datasource metadata:', error);
});
```
--
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]