michael-s-molina commented on code in PR #33024:
URL: https://github.com/apache/superset/pull/33024#discussion_r2031947208


##########
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 know that `logAction` is being called for each issue code according to the 
code. My question is if it should do that or just call `logAction` once and 
send the multiple codes in the payload.
   
   I'll try to ask differently. Let's say I receive a GENERIC_DB_ENGINE_ERROR 
with 3 issue codes as the result of one query. If I have a chart that counts 
the number of failed queries on SQL Lab, should that chart show 1 or 3?



-- 
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]

Reply via email to