{"record":{"id":"6df2f07b68b28f46","repo":"Devolutions/UniGetUI","slug":"the-outputpath-parameter-is-required-when-download","errorCode":null,"errorMessage":"The outputPath parameter is required when downloading a package.","messagePattern":"The outputPath parameter is required when downloading a package\\.","errorType":"validation","errorClass":"InvalidOperationException","httpStatus":400,"severity":"error","filePath":"src/UniGetUI.Interface.IpcApi/IpcPackageApi.cs","lineNumber":209,"sourceCode":"\n        var package = FindInstalledPackage(request);\n        return ExecuteOperationAsync(\n            \"uninstall-package\",\n            package,\n            request,\n            (pkg, options) => new UninstallPackageOperation(pkg, options)\n        );\n    }\n\n    public static async Task<IpcPackageOperationResult> DownloadPackageAsync(\n        IpcPackageActionRequest request\n    )\n    {\n        ArgumentNullException.ThrowIfNull(request);\n\n        if (string.IsNullOrWhiteSpace(request.OutputPath))\n        {\n            throw new InvalidOperationException(\n                \"The outputPath parameter is required when downloading a package.\"\n            );\n        }\n\n        var package = FindAnyPackage(request);\n        if (!package.Manager.Capabilities.CanDownloadInstaller)\n        {\n            throw new InvalidOperationException(\n                $\"The manager \\\"{IpcManagerSettingsApi.GetPublicManagerId(package.Manager)}\\\" does not support installer downloads.\"\n            );\n        }\n\n        var operation = new DownloadOperation(package, request.OutputPath);\n        string operationId = IpcOperationApi.Track(operation);\n\n        if (request.WaitForCompletion == false)\n        {\n            _ = Task.Run(() => RunTrackedOperationAsync(operation));","sourceCodeStart":191,"sourceCodeEnd":227,"githubUrl":"https://github.com/Devolutions/UniGetUI/blob/9b1d7d0eab91620fc15c86b36676532095936ae3/src/UniGetUI.Interface.IpcApi/IpcPackageApi.cs#L191-L227","documentation":"DownloadPackageAsync throws when request.OutputPath is null, empty, or whitespace. Downloading a package requires an explicit destination path that DownloadOperation writes to.","triggerScenarios":"Calling download-package with the outputPath field omitted or blank in the request body.","commonSituations":"Client JSON missing the field; serializer defaulted OutputPath to \"\"; UI submitted before a path was chosen.","solutions":["Set request.OutputPath to an absolute, writable path before calling","Validate the path is non-empty and the parent directory exists client-side","Use a path under a temp/exports folder the process can write"],"exampleFix":"// before\nvar req = new IpcPackageActionRequest { PackageId = \"git\" };\nawait IpcPackageApi.DownloadPackageAsync(req);\n// after\nvar req = new IpcPackageActionRequest\n{\n    PackageId = \"git\",\n    OutputPath = Path.Combine(exportsDir, \"git.installer.exe\")\n};\nawait IpcPackageApi.DownloadPackageAsync(req);","handlingStrategy":"validation","validationCode":"if (string.IsNullOrWhiteSpace(request.OutputPath)\n    || !Path.IsPathRooted(request.OutputPath))\n    throw new ArgumentException(\"OutputPath must be an absolute path\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Make OutputPath required in the request schema","Verify write access to the target folder before the call"],"tags":["ipc","package-download","validation"],"backgroundTag":null,"analyzedSha":"9b1d7d0eab91620fc15c86b36676532095936ae3","analyzedAt":"2026-08-13T12:19:18.278Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}