{"record":{"id":"a849f02ae19aeaf8","repo":"Kong/insomnia","slug":"failed-to-get-latest-commit-for-all-documents","errorCode":null,"errorMessage":"Failed to get latest commit for all documents","messagePattern":"Failed to get latest commit for all documents","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/insomnia-vcs/src/vcs.ts","lineNumber":552,"sourceCode":"    errorMsg: string,\n  ): Promise<MergeConflict[]> {\n    if (conflicts.length === 0) {\n      return conflicts;\n    }\n\n    if (!this._conflictHandler) {\n      throw new Error(errorMsg);\n    }\n\n    return this._conflictHandler(conflicts, labels);\n  }\n\n  async allDocuments(): Promise<Record<string, any>> {\n    const branch = await this._getCurrentBranch();\n    const snapshot: Snapshot | null = await this._getLatestSnapshot(branch.name);\n\n    if (!snapshot) {\n      throw new Error('Failed to get latest commit for all documents');\n    }\n    return this._getBlobs(snapshot.state.map(s => s.blob));\n  }\n\n  async rollbackToLatest(candidates: StatusCandidate[]) {\n    const branch = await this._getCurrentBranch();\n    const latestSnapshot = await this._getLatestSnapshot(branch.name);\n\n    if (!latestSnapshot) {\n      throw new Error('No commits to rollback to');\n    }\n\n    return this.rollback(latestSnapshot.id, candidates);\n  }\n\n  async rollback(snapshotId: string, candidates: StatusCandidate[]) {\n    const rollbackSnapshot: Snapshot | null = await this._getSnapshot(snapshotId);\n","sourceCodeStart":534,"sourceCodeEnd":570,"githubUrl":"https://github.com/Kong/insomnia/blob/d9bb2b0142600f21309832daea3317942d285984/packages/insomnia-vcs/src/vcs.ts#L534-L570","documentation":"Error \"Failed to get latest commit for all documents\" thrown in Kong/insomnia.","triggerScenarios":"Thrown at packages/insomnia-vcs/src/vcs.ts:552 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d9bb2b0142600f21309832daea3317942d285984","analyzedAt":"2026-08-26T18:04:05.187Z","schemaVersion":2},"datasetVersion":"2026-08-26T21:11:00.512Z"}