{"record":{"id":"8305fd62565218f0","repo":"Kong/insomnia","slug":"failed-to-find-commit-by-id-snapshotid","errorCode":null,"errorMessage":"Failed to find commit by id ${snapshotId}","messagePattern":"Failed to find commit by id (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/insomnia-vcs/src/vcs.ts","lineNumber":572,"sourceCode":"    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\n    const delta = stateDelta(currentState, rollbackSnapshot.state);\n    // We need to treat removals of candidates differently because they may not yet have been stored as blobs.\n    const remove: StatusCandidate[] = [];\n\n    for (const entry of delta.remove) {\n      const candidate = candidates.find(candidate => candidate.key === entry.key);\n\n      if (!candidate) {\n        // Should never happen\n        throw new Error('Failed to find removal in candidates');","sourceCodeStart":554,"sourceCodeEnd":590,"githubUrl":"https://github.com/Kong/insomnia/blob/d9bb2b0142600f21309832daea3317942d285984/packages/insomnia-vcs/src/vcs.ts#L554-L590","documentation":"Error \"Failed to find commit by id ${snapshotId}\" thrown in Kong/insomnia.","triggerScenarios":"Thrown at packages/insomnia-vcs/src/vcs.ts:572 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"}