diff --git a/frontend/src/lib/components/AppConnectInner.svelte b/frontend/src/lib/components/AppConnectInner.svelte index 18ab67a120..279165ffbd 100644 --- a/frontend/src/lib/components/AppConnectInner.svelte +++ b/frontend/src/lib/components/AppConnectInner.svelte @@ -1011,11 +1011,14 @@ requestBody: { ...accountData, variable_path: tokenPath } }) } catch (e) { - // An unlinked token never refreshes, and its path would block a retry. - await VariableService.deleteVariable({ - workspace: effectiveWorkspace, - path: tokenPath - }).catch(() => {}) + // An unlinked token never refreshes, and its path would block a retry. Not when + // filling: deleting a variable also deletes the resource at its path. + if (!filling) { + await VariableService.deleteVariable({ + workspace: effectiveWorkspace, + path: tokenPath + }).catch(() => {}) + } throw e } }