{"record":{"id":"bf2600b8f903564c","repo":"Devolutions/UniGetUI","slug":"the-path-field-is-required","errorCode":null,"errorMessage":"The path field is required.","messagePattern":"The path field is required\\.","errorType":"validation","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/UniGetUI.Interface.IpcApi/IpcManagerMaintenanceApi.cs","lineNumber":81,"sourceCode":"        return Success(\"reload-manager\", manager, \"reload\", \"completed\");\n    }\n\n    public static async Task<IpcManagerMaintenanceActionResult> SetExecutablePathAsync(\n        IpcManagerMaintenanceRequest request\n    )\n    {\n        ArgumentNullException.ThrowIfNull(request);\n        var manager = IpcManagerSettingsApi.ResolveManager(request.ManagerName);\n        if (!SecureSettings.Get(SecureSettings.K.AllowCustomManagerPaths))\n        {\n            throw new InvalidOperationException(\n                \"Custom manager paths are disabled by secure settings.\"\n            );\n        }\n\n        if (string.IsNullOrWhiteSpace(request.Path))\n        {\n            throw new InvalidOperationException(\"The path field is required.\");\n        }\n\n        Settings.SetDictionaryItem(Settings.K.ManagerPaths, manager.Name, request.Path);\n        await ReloadManagerAsync(manager);\n        return Success(\n            \"set-manager-executable\",\n            manager,\n            \"set-executable\",\n            \"completed\",\n            $\"Configured {manager.DisplayName} to use {request.Path}.\"\n        );\n    }\n\n    public static async Task<IpcManagerMaintenanceActionResult> ClearExecutablePathAsync(\n        IpcManagerMaintenanceRequest request\n    )\n    {\n        ArgumentNullException.ThrowIfNull(request);","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/Devolutions/UniGetUI/blob/9b1d7d0eab91620fc15c86b36676532095936ae3/src/UniGetUI.Interface.IpcApi/IpcManagerMaintenanceApi.cs#L63-L99","documentation":"Thrown by IpcManagerMaintenanceApi.SetExecutablePathAsync when request.Path is null or whitespace. This is checked only after the AllowCustomManagerPaths gate passes, so you only see it once custom paths are permitted. It guards against persisting an empty override into the ManagerPaths dictionary.","triggerScenarios":"POSTing to set-manager-executable with AllowCustomManagerPaths enabled but a missing/blank Path field in the body. To clear an override instead of setting one, the wrong endpoint is being used.","commonSituations":"Confusing set-manager-executable with clear-manager-executable (the latter removes the override). Sending an empty path expecting it to reset. A serialization bug dropping the Path field.","solutions":["Supply a non-empty executable path in the Path field.","To remove a custom override, call clear-manager-executable instead of set with an empty path.","Validate the path points to a real executable before sending to avoid a later reload failure."],"exampleFix":"// before: POST set-manager-executable { \"managerName\": \"scoop\", \"path\": \"\" }\n// after: POST clear-manager-executable { \"managerName\": \"scoop\" }","handlingStrategy":"validation","validationCode":"if (string.IsNullOrWhiteSpace(request.Path)) { /* send to clear-manager-executable instead, or reject */ }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Route 'remove override' intent to clear-manager-executable, not set with empty path.","Validate non-empty Path client-side before calling set-manager-executable."],"tags":["ipc","manager-maintenance","input-validation","missing-argument"],"backgroundTag":null,"analyzedSha":"9b1d7d0eab91620fc15c86b36676532095936ae3","analyzedAt":"2026-08-13T12:19:18.278Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}