{"record":{"id":"8a3c7a9d206f05f6","repo":"Devolutions/UniGetUI","slug":"no-upgradable-package-matching-id-packageid-wa","errorCode":null,"errorMessage":"No upgradable package matching id \"{PackageId}\" was found.","messagePattern":"No upgradable package matching id \"(.+?)\" was found\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":400,"severity":"warning","filePath":"src/UniGetUI.Interface.IpcApi/IpcPackageApi.cs","lineNumber":641,"sourceCode":"            return package;\n        }\n\n        throw new InvalidOperationException(\n            $\"No installed package matching id \\\"{request.PackageId}\\\" was found.\"\n        );\n    }\n\n    private static IPackage FindUpgradablePackage(IpcPackageActionRequest request)\n    {\n        var package = GetUpgradablePackagesSnapshot(request.ManagerName).FirstOrDefault(candidate =>\n            MatchesIdentity(candidate, request)\n        );\n        if (package is not null)\n        {\n            return package;\n        }\n\n        throw new InvalidOperationException(\n            $\"No upgradable package matching id \\\"{request.PackageId}\\\" was found.\"\n        );\n    }\n\n    private static IPackage FindUpgradablePackageOrInstalledPackage(\n        IpcPackageActionRequest request\n    )\n    {\n        try\n        {\n            return FindUpgradablePackage(request);\n        }\n        catch (InvalidOperationException)\n        {\n            return FindInstalledPackage(request);\n        }\n    }\n","sourceCodeStart":623,"sourceCodeEnd":659,"githubUrl":"https://github.com/Devolutions/UniGetUI/blob/9b1d7d0eab91620fc15c86b36676532095936ae3/src/UniGetUI.Interface.IpcApi/IpcPackageApi.cs#L623-L659","documentation":"FindUpgradablePackage throws when the upgradable-packages snapshot has no package matching the id. Used by update operations.","triggerScenarios":"Calling update on a package that has no available update.","commonSituations":"Already up to date; snapshot stale; updates disabled for the manager.","solutions":["Operate only on packages returned by the upgradable list","Refresh the upgradable snapshot before issuing updates","Treat 'no upgradable match' as already-current rather than a hard failure"],"exampleFix":"// before\nawait IpcPackageApi.UpdatePackageAsync(reqForFullyUpdatedPkg);\n// after\nif (GetUpgradablePackagesSnapshot(null).All(p => p.Id != req.PackageId))\n    return Result.UpToDate();\nawait IpcPackageApi.UpdatePackageAsync(req);","handlingStrategy":"validation","validationCode":"var hasUpdate = GetUpgradablePackagesSnapshot(request.ManagerName)\n    .Any(p => MatchesIdentity(p, request));\nif (!hasUpdate) return Result.UpToDate();","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Drive updates from the upgradable list, not the installed list","Refresh the upgradable snapshot on demand"],"tags":["ipc","package-lookup","updates"],"backgroundTag":null,"analyzedSha":"9b1d7d0eab91620fc15c86b36676532095936ae3","analyzedAt":"2026-08-13T12:19:18.278Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}