Skip to content

Commit

Permalink
[perf_logging] Add is_cached status when chart has error (#9009)
Browse files Browse the repository at this point in the history
  • Loading branch information
Grace Guo committed Jan 24, 2020
1 parent d3d8603 commit d0bc04f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions superset/assets/src/chart/chartAction.js
Expand Up @@ -259,11 +259,12 @@ export function exploreJSON(
return dispatch(chartUpdateSucceeded(json, key));
})
.catch(response => {
const appendErrorLog = errorDetails => {
const appendErrorLog = (errorDetails, isCached) => {
dispatch(
logEvent(LOG_ACTIONS_LOAD_CHART, {
slice_id: key,
has_err: true,
is_cached: isCached,
error_details: errorDetails,
datasource: formData.datasource,
start_offset: logStart,
Expand All @@ -283,7 +284,8 @@ export function exploreJSON(
return dispatch(chartUpdateStopped(key));
}
return getClientErrorObject(response).then(parsedResponse => {
appendErrorLog(parsedResponse.error);
// query is processed, but error out.
appendErrorLog(parsedResponse.error, parsedResponse.is_cached);
return dispatch(chartUpdateFailed(parsedResponse, key));
});
});
Expand Down

0 comments on commit d0bc04f

Please sign in to comment.