mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-17 00:02:59 +00:00
fix: keep the resource AppConnect fills when linking its account fails
Deleting a variable also deletes the resource at its path, so the rollback is skipped when filling an existing resource. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
40f3f6a515
commit
01c45104fd
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user