{"record":{"id":"b6a915cca284cbbf","repo":"Kong/insomnia","slug":"need-to-solve-merge-conflicts-first","errorCode":null,"errorMessage":"Need to solve merge conflicts first","messagePattern":"Need to solve merge conflicts first","errorType":"exception","errorClass":"MergeConflictError","httpStatus":null,"severity":"error","filePath":"packages/insomnia/src/sync/git/git-vcs.ts","lineNumber":1796,"sourceCode":"            theirsBlobContent,\n            suggestedMergeResult,\n            mergeResult: suggestedMergeResult,\n          });\n        }\n      }\n\n      // If all conflicts were auto-resolved (no YAML conflicts), complete the merge automatically\n      if (mergeConflicts.length === 0 && autoResolvedConflicts.length > 0) {\n        await this.continueMerge({\n          handledMergeConflicts: [],\n          autoResolvedConflicts,\n          commitMessage: `Merge branch '${theirsBranch}' into ${oursBranch}`,\n          commitParent: [oursHeadCommitOid, theirsHeadCommitOid],\n        });\n        return { autoResolved: true };\n      }\n\n      throw new MergeConflictError('Need to solve merge conflicts first', {\n        conflicts: mergeConflicts,\n        autoResolvedConflicts,\n        labels: {\n          ours: `${oursBranch} ${oursHeadCommitOid}`,\n          theirs: `${theirsBranch} ${theirsHeadCommitOid}`,\n        },\n        commitMessage: `Merge branch '${theirsBranch}' into ${oursBranch}`,\n        commitParent: [oursHeadCommitOid, theirsHeadCommitOid],\n      });\n    } else {\n      throw new Error('Merge conflict filepaths is of length 0');\n    }\n  }\n\n  // create a commit after resolving merge conflicts\n  async continueMerge({\n    handledMergeConflicts,\n    autoResolvedConflicts,","sourceCodeStart":1778,"sourceCodeEnd":1814,"githubUrl":"https://github.com/Kong/insomnia/blob/d9bb2b0142600f21309832daea3317942d285984/packages/insomnia/src/sync/git/git-vcs.ts#L1778-L1814","documentation":"Precondition error in GitVCS merge handling: a merge cannot complete (or switch branches) while unresolved merge conflicts remain in the working tree; conflicts must be resolved and the merge continued first.","triggerScenarios":"Thrown at packages/insomnia/src/sync/git/git-vcs.ts:1796 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Resolve each conflicted file (choose ours/theirs/merged) in the sync UI","Run continueMerge with the handled conflicts to commit the resolution, then retry the operation"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d9bb2b0142600f21309832daea3317942d285984","analyzedAt":"2026-08-26T18:04:05.187Z","contentChangedAt":"2026-08-26T18:04:05.187Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}