feat(connection): preserve failed one-time connections

This commit is contained in:
zipg authored and GitHub committed 2026-08-25 14:02:51 +08:00
1 parent d1d8dc4aec
commit b488942d82
2 files changed
+11 -1

No files matched your search

@@ -5190,7 +5190,8 @@ async function save() {
.catch((e: any) => {
const message = String(e?.message || e);
if (message.includes(CONNECTION_ATTEMPT_CANCELLED_MESSAGE)) return;
if (config.one_time) void store.removeConnection(config.id);
// Keep failed one-time connections available for retry and error inspection.
// They are still removed by connectionStore.disconnect after a successful session.
emit("connectFailed", appendConnectionErrorHints(config, mongodbAuthFailureHint(message), t));
});
return;