{"record":{"id":"2ab12d26acba0aff","repo":"Kong/insomnia","slug":"no-commits-to-rollback-to","errorCode":null,"errorMessage":"No commits to rollback to","messagePattern":"No commits to rollback to","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/insomnia-vcs/src/vcs.ts","lineNumber":562,"sourceCode":"    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\n    if (rollbackSnapshot === null) {\n      throw new Error(`Failed to find commit by id ${snapshotId}`);\n    }\n\n    const currentState: SnapshotState = candidates.map(candidate => ({\n      key: candidate.key,\n      blob: hashDocument(candidate.document).hash,\n      name: candidate.name,\n    }));\n","sourceCodeStart":544,"sourceCodeEnd":580,"githubUrl":"https://github.com/Kong/insomnia/blob/d9bb2b0142600f21309832daea3317942d285984/packages/insomnia-vcs/src/vcs.ts#L544-L580","documentation":"Error \"No commits to rollback to\" thrown in Kong/insomnia.","triggerScenarios":"Thrown at packages/insomnia-vcs/src/vcs.ts:562 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"}