mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
fix: no lazy translation on SupersetError (#15669)
* fix: no lazy translation on SupersetError * Small fixes
This commit is contained in:
@@ -250,18 +250,22 @@ export function queryFailed(query, msg, link, errors) {
|
||||
})
|
||||
: Promise.resolve();
|
||||
|
||||
return sync
|
||||
.then(() => dispatch({ type: QUERY_FAILED, query, msg, link, errors }))
|
||||
.catch(() =>
|
||||
dispatch(
|
||||
addDangerToast(
|
||||
t(
|
||||
'An error occurred while storing the latest query id in the backend. ' +
|
||||
'Please contact your administrator if this problem persists.',
|
||||
return (
|
||||
sync
|
||||
.catch(() =>
|
||||
dispatch(
|
||||
addDangerToast(
|
||||
t(
|
||||
'An error occurred while storing the latest query id in the backend. ' +
|
||||
'Please contact your administrator if this problem persists.',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
)
|
||||
// We should always show the error message, even if we couldn't sync the
|
||||
// state to the backend
|
||||
.then(() => dispatch({ type: QUERY_FAILED, query, msg, link, errors }))
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user