{"record":{"id":"a520312cee0c50c8","repo":"Kong/insomnia","slug":"more-than-one-backend-project-matched-query","errorCode":null,"errorMessage":"More than one backend project matched query","messagePattern":"More than one backend project matched query","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/insomnia-vcs/src/vcs.ts","lineNumber":1558,"sourceCode":"      for (const p of matchedBackendProjects) {\n        const branches = await this._getBranches(p.id);\n\n        if (!branches.find(b => b.snapshots.length > 0)) {\n          await this._removeProject(p);\n          matchedBackendProjects = matchedBackendProjects.filter(({ id }) => id !== p.id);\n          console.log(`[sync] Remove inactive project for root ${rootDocumentId}`);\n        }\n      }\n    }\n\n    // If there are still too many, error out\n    if (matchedBackendProjects.length > 1) {\n      console.log('[sync] Multiple backend projects matched for root', {\n        backendProjects,\n        matchedBackendProjects,\n        rootDocumentId,\n      });\n      throw new Error('More than one backend project matched query');\n    }\n\n    return matchedBackendProjects[0] || null;\n  }\n\n  async _getOrCreateBackendProjectByRootDocument(rootDocumentId: string, name: string) {\n    let project: BackendProject | null = await this._getBackendProjectByRootDocument(rootDocumentId);\n\n    // If we still don't have a project, create one\n    if (!project) {\n      const id = generateId('prj');\n      project = {\n        id,\n        name,\n        rootDocumentId,\n      };\n      await this._storeBackendProject(project);\n      console.log(`[sync] Created backend project ${project.id}`);","sourceCodeStart":1540,"sourceCodeEnd":1576,"githubUrl":"https://github.com/Kong/insomnia/blob/d9bb2b0142600f21309832daea3317942d285984/packages/insomnia-vcs/src/vcs.ts#L1540-L1576","documentation":"Error \"More than one backend project matched query\" thrown in Kong/insomnia.","triggerScenarios":"Thrown at packages/insomnia-vcs/src/vcs.ts:1558 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"}