{"record":{"id":"85f9647158eacb1e","repo":"stablyai/orca","slug":"error","errorCode":null,"errorMessage":"error","messagePattern":"error","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"src/main/ipc/keybindings.ts","lineNumber":54,"sourceCode":"      broadcastKeybindingsChanged(snapshot)\n      onChanged?.()\n      return snapshot\n    }\n  )\n\n  ipcMain.handle('keybindings:reload', () => {\n    const snapshot = service.reload()\n    broadcastKeybindingsChanged(snapshot)\n    onChanged?.()\n    return snapshot\n  })\n\n  ipcMain.handle('keybindings:openFile', async () => {\n    const snapshot = service.ensureFile()\n    authorizeExternalPath(snapshot.path)\n    const error = await shell.openPath(snapshot.path)\n    if (error) {\n      throw new Error(error)\n    }\n    return snapshot\n  })\n\n  ipcMain.handle('keybindings:revealFile', () => {\n    const snapshot = service.ensureFile()\n    authorizeExternalPath(snapshot.path)\n    shell.showItemInFolder(snapshot.path)\n    return snapshot\n  })\n}\n","sourceCodeStart":36,"sourceCodeEnd":66,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/src/main/ipc/keybindings.ts#L36-L66","documentation":"Thrown by the keybindings:openFile IPC handler when Electron's shell.openPath returns a non-empty error string. shell.openPath returns a string on failure (empty string on success); the handler surfaces that string verbatim as the Error message. The literal message 'error' means Electron returned the generic failure string 'error' (or a localized equivalent), indicating the OS declined to open the keybindings file.","triggerScenarios":"Invoking the keybindings:openFile IPC after the keybindings file is ensured to exist, when the host OS fails to launch the default application for that path. The file was just created via service.ensureFile() and authorizeExternalPath passed, but the OS open call fails.","commonSituations":"No default application is associated with the file type (e.g. .json or .kdl on a fresh OS install). The file path points to a location the OS sandbox restricts. A transient OS error, missing default editor, or the file was deleted between ensureFile and openPath. Permission issues on the config directory.","solutions":["Set a default application for the keybindings file extension in the OS.","Verify the config directory and file are readable/executable by the current user.","Retry once; transient OS launch failures can succeed on a second attempt.","If persistent, use the keybindings:revealFile handler to open the containing folder in the file manager and open the file manually."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await ipc.call('keybindings:openFile')\n} catch (e) {\n  // Electron openPath failed; fall back to revealing the file in the file manager.\n  await ipc.call('keybindings:revealFile')\n}","preventionTips":["Ensure a default application is registered for the keybindings file extension.","Verify the config directory is accessible before offering the open action.","Provide a reveal-in-folder fallback when openPath fails."],"tags":["electron","shell","os-integration","keybindings","ipc"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}