{"record":{"id":"88b865e667697c59","repo":"BloopAI/vibe-kanban","slug":"failed-to-open-repository-in-ide","errorCode":null,"errorMessage":"Failed to open repository in IDE","messagePattern":"Failed to open repository in IDE","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/web-core/src/shared/actions/index.ts","lineNumber":1133,"sourceCode":"\n  RepoOpenInIDE: {\n    id: 'repo-open-in-ide',\n    label: 'Open Repo in IDE',\n    icon: DesktopIcon,\n    requiresTarget: ActionTargetType.GIT,\n    isVisible: (ctx) => ctx.hasWorkspace && ctx.hasGitRepos,\n    execute: async (_ctx, _workspaceId, repoId) => {\n      try {\n        const response = await repoApi.openEditor(repoId, {\n          editor_type: null,\n          file_path: null,\n        });\n        if (response.url) {\n          window.open(response.url, '_blank');\n        }\n      } catch (err) {\n        console.error('Failed to open repo in editor:', err);\n        throw new Error('Failed to open repository in IDE');\n      }\n    },\n  },\n\n  RepoSettings: {\n    id: 'repo-settings',\n    label: 'Repository Settings',\n    icon: GearIcon,\n    requiresTarget: ActionTargetType.GIT,\n    isVisible: (ctx) => ctx.hasWorkspace && ctx.hasGitRepos,\n    execute: async (_ctx, _workspaceId, repoId) => {\n      await SettingsDialog.show({\n        initialSection: 'repos',\n        initialState: {\n          repoId,\n        },\n      });\n    },","sourceCodeStart":1115,"sourceCodeEnd":1151,"githubUrl":"https://github.com/BloopAI/vibe-kanban/blob/4deb7eca8f381f7cbc1f9d15515a9ab8f8009053/packages/web-core/src/shared/actions/index.ts#L1115-L1151","documentation":"Thrown by the RepoOpenInIDE action when the network request to fetch a deep-link URL for opening the repository in the user's IDE fails, or the response contains no url. The action posts to an API endpoint, then calls window.open(response.url, '_blank'); any failure is caught, logged, and rethrown as this generic Error.","triggerScenarios":"Calling the RepoOpenInIDE execute() when the backend endpoint that resolves the repo path into an editor URL returns a non-2xx status, the network request rejects (server down, CORS), or the backend responds successfully but without response.url set.","commonSituations":"Backend service not running or restarting while the frontend is open, IDE/editor scheme not configured on the server, repo path missing on disk so the server cannot build a URL, or a stale workspace pointing at a deleted repository.","solutions":["Verify the backend is running and the repo-open endpoint returns 200 with a url field.","Confirm the repository still exists on disk and its path is valid in the repos table.","Check the configured IDE/editor type on the server supports deep links (vscode://, cursor://, etc.).","Inspect the browser console/network tab for the logged underlying error (console.error('Failed to open repo in editor:', err)).","Handle the missing-url case explicitly in the response handling instead of silently doing nothing."],"exampleFix":"// before\nif (response.url) {\n  window.open(response.url, '_blank');\n}\n// after\nif (response.url) {\n  window.open(response.url, '_blank');\n} else {\n  console.warn('No IDE url returned; falling back to repo path');\n}","handlingStrategy":"try-catch","validationCode":"// before opening\nif (!repoId) throw new Error('repoId is required');\nconst repo = await repoApi.getById(repoId);\nif (!repo?.path) throw new Error('Repository path unavailable; cannot open in IDE');","typeGuard":"function hasIdeUrl(res: { url?: string | null }): res is { url: string } {\n  return typeof res.url === 'string' && res.url.length > 0;\n}","tryCatchPattern":"try {\n  const response = await openInEditorApi(repoId);\n  if (hasIdeUrl(response)) window.open(response.url, '_blank');\n  else toast.warning('Editor did not return a URL');\n} catch (err) {\n  toast.error('Could not open repository in IDE. Is the backend running?');\n  console.error(err);\n}","preventionTips":["Check backend health before invoking IDE deep-link actions.","Validate the repository still exists and has a path on disk.","Surface the underlying error message to the user instead of a generic one.","Watch the network tab for failing open-in-editor requests during setup changes."],"tags":["network","ide","api"],"backgroundTag":"api-request-failed","analyzedSha":"4deb7eca8f381f7cbc1f9d15515a9ab8f8009053","analyzedAt":"2026-08-29T09:24:13.446Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}