{"record":{"id":"6d6fbfe3b01ab67f","repo":"usebruno/bruno","slug":"workspace-path-is-required","errorCode":null,"errorMessage":"Workspace path is required.","messagePattern":"Workspace path is required\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/bruno-app/src/utils/mock-server/mock-server-instances.js","lineNumber":168,"sourceCode":"      await dispatch(refreshMockRoutes(location)).unwrap();\n    } catch {\n      // Running server may have stopped between hydrate and refresh.\n    }\n  }));\n\n  return instances;\n};\n\nexport const saveMockServerInstance = (instance) => async (dispatch, getState) => {\n  const state = getState();\n  const workspacePath = resolveMockServerWorkspacePath(\n    instance,\n    state.workspaces.workspaces,\n    state.workspaces.workspaces.find((workspace) => workspace.uid === state.workspaces.activeWorkspaceUid) || null\n  );\n\n  if (!workspacePath) {\n    throw new Error('Workspace path is required.');\n  }\n\n  const result = await window.ipcRenderer.invoke('renderer:mock-server-save-instance', {\n    workspacePath,\n    instance\n  });\n\n  if (!result?.success) {\n    throw new Error(result?.error || 'Failed to save mock server');\n  }\n\n  const savedInstance = result.instance || instance;\n  dispatch(upsertMockServerInstance({\n    workspaceUid: instance.workspaceUid,\n    instance: savedInstance\n  }));\n\n  return savedInstance;","sourceCodeStart":150,"sourceCodeEnd":186,"githubUrl":"https://github.com/usebruno/bruno/blob/9bdd81c7bdc57006e5f5ebffb79321a8d979f712/packages/bruno-app/src/utils/mock-server/mock-server-instances.js#L150-L186","documentation":"Error \"Workspace path is required.\" thrown in usebruno/bruno.","triggerScenarios":"Thrown at packages/bruno-app/src/utils/mock-server/mock-server-instances.js:168 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Open a workspace before managing mock servers.","Pass a valid workspace path to the operation."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9bdd81c7bdc57006e5f5ebffb79321a8d979f712","analyzedAt":"2026-08-13T04:09:25.751Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}