{"record":{"id":"72e41cc359d55f7a","repo":"Devolutions/UniGetUI","slug":"no-known-source-matching-request-sourcename-wa","errorCode":null,"errorMessage":"No known source matching \"{request.SourceName}\" was found for manager \"{manager.Name}\".","messagePattern":"No known source matching \"(.+?)\" was found for manager \"(.+?)\"\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/UniGetUI.Interface.IpcApi/IpcManagerSettingsApi.cs","lineNumber":421,"sourceCode":"    {\n        if (string.IsNullOrWhiteSpace(request.SourceName))\n        {\n            throw new InvalidOperationException(\"The source name is required.\");\n        }\n\n        if (!string.IsNullOrWhiteSpace(request.SourceUrl))\n        {\n            return new ManagerSource(\n                manager,\n                request.SourceName,\n                new Uri(request.SourceUrl, UriKind.Absolute)\n            );\n        }\n\n        return manager.Properties.KnownSources.FirstOrDefault(source =>\n                SourceMatches(source, request.SourceName, null)\n            )\n            ?? throw new InvalidOperationException(\n                $\"No known source matching \\\"{request.SourceName}\\\" was found for manager \\\"{manager.Name}\\\".\"\n            );\n    }\n\n    private static IManagerSource ResolveSourceForRemove(\n        IPackageManager manager,\n        IpcSourceRequest request\n    )\n    {\n        if (string.IsNullOrWhiteSpace(request.SourceName))\n        {\n            throw new InvalidOperationException(\"The source name is required.\");\n        }\n\n        var configuredSource = GetConfiguredSources(manager).FirstOrDefault(source =>\n            SourceMatches(source, request.SourceName, request.SourceUrl)\n        );\n        if (configuredSource is not null)","sourceCodeStart":403,"sourceCodeEnd":439,"githubUrl":"https://github.com/Devolutions/UniGetUI/blob/9b1d7d0eab91620fc15c86b36676532095936ae3/src/UniGetUI.Interface.IpcApi/IpcManagerSettingsApi.cs#L403-L439","documentation":"Thrown by ResolveSourceForAdd when SourceName is provided but SourceUrl is empty/null, AND no entry in manager.Properties.KnownSources matches the SourceName (by Name or DisplayName, case-insensitive). This means the caller wants to add a known source by name but used a name that doesn't exist in the manager's known source list.","triggerScenarios":"Calling AddSourceAsync with a SourceName that doesn't match any known source's Name or DisplayName (via SourceMatches), and without providing a SourceUrl. SourceMatches checks Name, DisplayName, and optionally Url for equality.","commonSituations":"Typo in the source name (e.g., 'extas' instead of 'extras'). Manager doesn't have any predefined KnownSources (e.g., a manager that only supports user-added sources). The source name is correct but in a different casing or language variant that SourceMatches doesn't catch (it does case-insensitive, but not fuzzy).","solutions":["Provide SourceUrl along with SourceName to create a custom source rather than relying on KnownSources lookup.","Call ListSources(managerName) to see valid known source names before adding.","Check the exact spelling — SourceMatches is case-insensitive but requires exact Name or DisplayName match."],"exampleFix":"// before — unknown source name without URL\nawait IpcManagerSettingsApi.AddSourceAsync(new IpcSourceRequest {\n    ManagerName = \"scoop\", SourceName = \"mycustombucket\"\n});\n// after — provide URL for custom source\nawait IpcManagerSettingsApi.AddSourceAsync(new IpcSourceRequest {\n    ManagerName = \"scoop\", SourceName = \"mycustombucket\",\n    SourceUrl = \"https://github.com/user/mycustombucket\"\n});","handlingStrategy":"validation","validationCode":"var knownSources = IpcManagerSettingsApi.ListSources(request.ManagerName)\n    .Where(s => s.IsKnown)\n    .Select(s => s.Name)\n    .ToHashSet(StringComparer.OrdinalIgnoreCase);\n\nif (string.IsNullOrWhiteSpace(request.SourceUrl) && !knownSources.Contains(request.SourceName))\n    throw new ArgumentException($\"Unknown source '{request.SourceName}'. Provide SourceUrl or use a known source.\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Provide SourceUrl for custom sources that aren't in KnownSources.","Call ListSources(managerName) to see known source names before adding by name.","SourceMatches checks Name and DisplayName case-insensitively."],"tags":["sources","ipc","validation","lookup"],"backgroundTag":null,"analyzedSha":"9b1d7d0eab91620fc15c86b36676532095936ae3","analyzedAt":"2026-08-13T12:19:18.278Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}