msyavuz commented on code in PR #42241:
URL: https://github.com/apache/superset/pull/42241#discussion_r3615186763
##########
superset-frontend/src/SqlLab/actions/sqlLab.ts:
##########
@@ -1632,9 +1644,10 @@ export function popDatasourceQuery(
}),
),
)
- .catch(() =>
- dispatch(addDangerToast(t("The datasource couldn't be loaded"))),
- );
+ .catch(() => {
+ dispatch(addDangerToast(t("The datasource couldn't be loaded")));
+ dispatch(addNewQueryEditor());
Review Comment:
When tabs are already open this appends a new blank tab rather than landing
on the existing active one, so repeat visits to the same dead link accumulate
"Untitled Query N" tabs persisted under `SqllabBackendPersistence`.
##########
superset-frontend/src/SqlLab/actions/sqlLab.ts:
##########
@@ -1530,7 +1530,10 @@ export function popPermalink(key: string):
SqlLabThunkAction<Promise<unknown>> {
}),
),
)
- .catch(() => dispatch(addDangerToast(ERR_MSG_CANT_LOAD_QUERY)));
+ .catch(() => {
+ dispatch(addDangerToast(ERR_MSG_CANT_LOAD_QUERY));
+ dispatch(addNewQueryEditor());
Review Comment:
This catch fires on any failure, not just 404 — on a transient 500 the
permalink gets burned, since the resulting `activeQueryEditorId` change makes
`PopEditorTab` replace the URL with a bare `/sqllab` (`restUrlParams` drops
`permalink`/`savedQueryId`) and a reload can't retry. Worth narrowing to 404?
--
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]