{"record":{"id":"75e13f1db66bd875","repo":"stablyai/orca","slug":"no-git-provider-for-connection-args-connectioni","errorCode":null,"errorMessage":"No git provider for connection \"${args.connectionId}\"","messagePattern":"No git provider for connection \"(.+?)\"","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/main/ipc/filesystem.ts","lineNumber":1342,"sourceCode":"      if (args.connectionId) {\n        const provider = getSshGitProvider(args.connectionId)\n        if (!provider) {\n          throw new Error(SSH_GIT_PROVIDER_UNAVAILABLE_MESSAGE)\n        }\n        return provider.detectConflictOperation(args.worktreePath)\n      }\n      const worktreePath = await resolveRegisteredWorktreePath(args.worktreePath, store)\n      return detectConflictOperation(worktreePath)\n    }\n  )\n\n  ipcMain.handle(\n    'git:abortMerge',\n    async (_event, args: { worktreePath: string; connectionId?: string }): Promise<void> => {\n      if (args.connectionId) {\n        const provider = getSshGitProvider(args.connectionId)\n        if (!provider) {\n          throw new Error(`No git provider for connection \"${args.connectionId}\"`)\n        }\n        return provider.abortMerge(args.worktreePath)\n      }\n      const worktreePath = await resolveRegisteredWorktreePath(args.worktreePath, store)\n      const gitOptions = getLocalGitOptionsForRegisteredWorktree(\n        store,\n        args.worktreePath,\n        worktreePath\n      )\n      await abortMerge(worktreePath, gitOptions)\n    }\n  )\n\n  ipcMain.handle(\n    'git:abortRebase',\n    async (_event, args: { worktreePath: string; connectionId?: string }): Promise<void> => {\n      if (args.connectionId) {\n        const provider = getSshGitProvider(args.connectionId)","sourceCodeStart":1324,"sourceCodeEnd":1360,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/src/main/ipc/filesystem.ts#L1324-L1360","documentation":"Thrown by the 'git:abortMerge' handler (src/main/ipc/filesystem.ts:1342) when args.connectionId is set but getSshGitProvider(connectionId) is undefined. Root cause is identical to the SSH_GIT_PROVIDER_UNAVAILABLE_MESSAGE family, but the message is an ad-hoc template literal `No git provider for connection \"${connectionId}\"` rather than the shared constant — so clients that match on the canonical 'Remote connection dropped...' text will NOT catch this variant.","triggerScenarios":"Invoking ipcRenderer.invoke('git:abortMerge', { worktreePath, connectionId }) while the SSH git provider for connectionId is unregistered (disconnect/reconnect) or was never established.","commonSituations":"User clicks 'Abort merge' on a remote worktree right after the SSH session dropped; reconnect produced a new connectionId but the merge-abort action still holds the old one.","solutions":["Reconnect the SSH target and retry git:abortMerge with the refreshed connectionId.","When matching this error in client code, key off 'No git provider for connection' rather than the canonical SSH_GIT_PROVIDER_UNAVAILABLE_MESSAGE string.","Consider unifying the message to the shared constant so all remote-provider-missing sites are consistent."],"exampleFix":"// before: abort on a stale connection, only the canonical message handled\ntry { await invoke('git:abortMerge', { worktreePath, connectionId }) }\ncatch (e) { if (e.message === SSH_GIT_PROVIDER_UNAVAILABLE_MESSAGE) reconnect() }\n\n// after: also handle the abortMerge/abortRebase variant string\nconst missing = /No git provider for connection|Remote connection dropped/\ntry { await invoke('git:abortMerge', { worktreePath, connectionId }) }\ncatch (e) { if (missing.test(e.message)) connectionId = await reconnect(targetId) }","handlingStrategy":"retry","validationCode":"// Handle the abortMerge-specific message variant too.\nconst MISSING = /No git provider for connection|Remote connection dropped/\nif (MISSING.test(lastError)) connectionId = await reconnectSshTarget(targetId)","typeGuard":null,"tryCatchPattern":"const MISSING = /No git provider for connection|Remote connection dropped/\ntry {\n  return await invoke('git:abortMerge', { worktreePath, connectionId })\n} catch (e) {\n  if (e instanceof Error && MISSING.test(e.message)) {\n    connectionId = await reconnectSshTarget(targetId)\n    return invoke('git:abortMerge', { worktreePath, connectionId })\n  }\n  throw e\n}","preventionTips":["Match on a regex covering BOTH message variants, not the canonical constant alone.","Refresh connectionId from the reconnect result before retrying abort.","Consider unifying the handler message with SSH_GIT_PROVIDER_UNAVAILABLE_MESSAGE upstream."],"tags":["ssh","git","ipc","merge","consistency"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}