Skip to content

Commit

Permalink
fix: reduce alert error to warning (#27744)
Browse files Browse the repository at this point in the history
(cherry picked from commit 70da454)
  • Loading branch information
eschutho authored and michael-s-molina committed Mar 28, 2024
1 parent 19b05d3 commit c377ccf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion superset-frontend/src/components/Chart/chartAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ export function addChart(chart, key) {
}

export function handleChartDataResponse(response, json, useLegacyApi) {
if (isFeatureEnabled(FeatureFlag.GlobalAsyncQueries)) {
if (isFeatureEnabled(FeatureFlag.GLOBAL_ASYNC_QUERIES)) {
// deal with getChartDataRequest transforming the response data
const result = 'result' in json ? json.result : json;
switch (response.status) {
Expand Down
6 changes: 3 additions & 3 deletions superset-frontend/src/components/Chart/chartActions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ describe('chart actions', () => {
waitForAsyncDataStub.restore();

global.featureFlags = {
[FeatureFlag.GlobalAsyncQueries]: false,
[FeatureFlag.GLOBAL_ASYNC_QUERIES]: false,
};
});

Expand Down Expand Up @@ -136,7 +136,7 @@ describe('chart actions', () => {

it('handleChartDataResponse should handle responses when GlobalAsyncQueries flag is enabled and results are returned synchronously', async () => {
global.featureFlags = {
[FeatureFlag.GlobalAsyncQueries]: true,
[FeatureFlag.GLOBAL_ASYNC_QUERIES]: true,
};
const result = await handleChartDataResponse(
{ status: 200 },
Expand All @@ -147,7 +147,7 @@ describe('chart actions', () => {

it('handleChartDataResponse should handle responses when GlobalAsyncQueries flag is enabled and query is running asynchronously', async () => {
global.featureFlags = {
[FeatureFlag.GlobalAsyncQueries]: true,
[FeatureFlag.GLOBAL_ASYNC_QUERIES]: true,
};
const result = await handleChartDataResponse(
{ status: 202 },
Expand Down
2 changes: 1 addition & 1 deletion superset/commands/report/alert.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def _execute_query(self) -> pd.DataFrame:
logger.warning("A timeout occurred while executing the alert query: %s", ex)
raise AlertQueryTimeout() from ex
except Exception as ex:
logger.exception("An error occurred when running alert query")
logger.warning("An error occurred when running alert query")
# The exception message here can reveal to much information to malicious
# users, so we raise a generic message.
raise AlertQueryError(
Expand Down

0 comments on commit c377ccf

Please sign in to comment.