{"record":{"id":"bbc66c268a1a679f","repo":"gitbutlerapp/gitbutler","slug":"resp","errorCode":null,"errorMessage":"resp","messagePattern":"resp","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"apps/desktop/src/lib/config/gitConfigService.ts","lineNumber":83,"sourceCode":"\t}\n\n\tasync setGerritMode(projectId: string, gerritMode: boolean) {\n\t\treturn await this.setGbConfig(projectId, { gitbutlerGerritMode: gerritMode });\n\t}\n\n\tasync setForgeReviewTemplatePath(projectId: string, path: string | null) {\n\t\treturn await this.setGbConfig(projectId, { gitbutlerForgeReviewTemplatePath: path });\n\t}\n\n\tasync checkGitFetch(projectId: string, remoteName: string | null | undefined) {\n\t\tif (!remoteName) return;\n\t\tconst resp = await this.backend.invoke<string>(\"git_test_fetch\", {\n\t\t\tprojectId: projectId,\n\t\t\taction: \"modal\",\n\t\t\tremoteName,\n\t\t});\n\t\t// fix: we should have a response with an optional error\n\t\tif (resp) throw new Error(resp);\n\t\treturn;\n\t}\n\n\tasync checkGitPush(\n\t\tprojectId: string,\n\t\tremoteName: string | null | undefined,\n\t\tbranchName: string | null | undefined,\n\t) {\n\t\tif (!remoteName) return;\n\t\tconst resp = await this.backend.invoke<string>(\"git_test_push\", {\n\t\t\tprojectId: projectId,\n\t\t\taction: \"modal\",\n\t\t\tremoteName,\n\t\t\tbranchName,\n\t\t});\n\t\tif (resp) throw new Error(resp);\n\t\treturn { name: \"push\", ok: true };\n\t}","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/58e5313667b857ef39a730e380af31816a7b1768/apps/desktop/src/lib/config/gitConfigService.ts#L65-L101","documentation":"checkGitFetch invokes the backend git_test_fetch command and throws the raw response variable (resp) when the backend reports a problem. resp is the string returned by git_test_fetch describing why fetching from the configured remote failed (bad credentials, missing remote, network error), so the thrown value is the backend's own diagnostic rather than a fixed message.","triggerScenarios":"Thrown at apps/desktop/src/lib/config/gitConfigService.ts:83 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the thrown resp text to identify the underlying fetch failure (credentials, remote URL, network)","Prompt the user to update remote credentials or the remote URL based on the resp content","Treat an empty/OK resp as success and only surface non-empty error responses"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"58e5313667b857ef39a730e380af31816a7b1768","analyzedAt":"2026-09-18T06:50:32.052Z","contentChangedAt":"2026-09-18T06:50:32.052Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}