michael-s-molina commented on code in PR #33024:
URL: https://github.com/apache/superset/pull/33024#discussion_r2031922741
##########
superset-frontend/src/SqlLab/actions/sqlLab.js:
##########
@@ -252,28 +252,32 @@ export function querySuccess(query, results) {
return { type: QUERY_SUCCESS, query, results };
}
-export function queryFailed(query, msg, link, errors) {
+export function logFailedQuery(query, errors) {
return function (dispatch) {
const eventData = {
has_err: true,
start_offset: query.startDttm,
ts: new Date().getTime(),
};
- errors?.forEach(({ error_type: errorType, extra }) => {
- const messages = extra?.issue_codes?.map(({ message }) => message) || [
- errorType,
- ];
- messages.forEach(message => {
+ errors?.forEach(({ error_type: errorType, message, extra }) => {
+ const issueCodes = extra?.issue_codes?.map(({ code }) => code) || [-1];
+ issueCodes.forEach(issueCode => {
Review Comment:
I guess my question is a little bit different. I'm asking if multiple issue
codes should be logged as multiple error messages or if they should be logged
as one message with multiple codes.
```
messages.forEach(msg => {
dispatch(logEvent(LOG_ACTIONS_SQLLAB_FETCH_FAILED_QUERY))
```
I was understanding that when a `GENERIC_DB_ENGINE_ERROR` occurs and it
contains multiple issue codes, we would call
`logEvent(LOG_ACTIONS_SQLLAB_FETCH_FAILED_QUERY)` just once and add all issue
codes as part of the payload.
--
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]