{"record":{"id":"d13a37a7ff443eb5","repo":"Devolutions/UniGetUI","slug":"unsupported-page-page-supported-pages-str","errorCode":null,"errorMessage":"Unsupported page \\\"{page}\\\". Supported pages: {string.Join(\", \", SupportedPages)}.","messagePattern":"Unsupported page \\\\\"(.+?)\\\\\"\\. Supported pages: (.+?)\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"warning","filePath":"src/UniGetUI.Interface.IpcApi/IpcAppApi.cs","lineNumber":59,"sourceCode":"    {\n        ArgumentException.ThrowIfNullOrWhiteSpace(page);\n\n        string normalized = page.Trim().ToLowerInvariant();\n        return normalized switch\n        {\n            \"discover\" => normalized,\n            \"updates\" => normalized,\n            \"installed\" => normalized,\n            \"bundles\" => normalized,\n            \"settings\" => normalized,\n            \"managers\" => normalized,\n            \"own-log\" => normalized,\n            \"manager-log\" => normalized,\n            \"operation-history\" => normalized,\n            \"help\" => normalized,\n            \"release-notes\" => normalized,\n            \"about\" => normalized,\n            _ => throw new InvalidOperationException(\n                $\"Unsupported page \\\"{page}\\\". Supported pages: {string.Join(\", \", SupportedPages)}.\"\n            ),\n        };\n    }\n\n    public static string ToPageName(string? pageTypeName)\n    {\n        if (string.IsNullOrWhiteSpace(pageTypeName))\n        {\n            return \"\";\n        }\n\n        return pageTypeName switch\n        {\n            \"Discover\" => \"discover\",\n            \"Updates\" => \"updates\",\n            \"Installed\" => \"installed\",\n            \"Bundles\" => \"bundles\",","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/Devolutions/UniGetUI/blob/9b1d7d0eab91620fc15c86b36676532095936ae3/src/UniGetUI.Interface.IpcApi/IpcAppApi.cs#L41-L77","documentation":"IpcAppPages.NormalizePageName lower-cases and trims the input, then matches it against the twelve supported page names (discover, updates, installed, bundles, settings, managers, own-log, manager-log, operation-history, help, release-notes, about). Any input that does not exactly match one of these after normalization throws InvalidOperationException, listing the full set of supported pages in the message.","triggerScenarios":"An IPC client sends a navigate command with a page name not in the supported set — e.g. \"packages\", \"log\", \"home\", \"dashboard\", or a typo like \"update\" (singular). NormalizePageName is also reachable when a client sends a PascalCase type name that ToPageName did not map.","commonSituations":"A client uses a page name from an older or newer version where the supported set differs. A typo in the page string. A client sends a human-readable label instead of the canonical key. A third-party integration guesses page names rather than consulting SupportedPages.","solutions":["Use one of the exact supported page keys: discover, updates, installed, bundles, settings, managers, own-log, manager-log, operation-history, help, release-notes, about.","Before navigating, fetch IpcAppPages.SupportedPages (exposed via AppInfoProvider) and validate the input.","If using a PascalCase type name, route it through ToPageName first, which returns the canonical lowercase key.","Fix typos: the correct plural forms are \"updates\", \"managers\"."],"exampleFix":"// before: wrong page name\nawait ipc.NavigateAppAsync(\"home\");\n// after: use a supported page name\nawait ipc.NavigateAppAsync(\"discover\");","handlingStrategy":"validation","validationCode":"string page = \"discover\";\nif (!IpcAppPages.SupportedPages.Contains(page.Trim().ToLowerInvariant()))\n    throw new ArgumentException($\"Unknown page: {page}\");","typeGuard":"static bool IsValidPage(string page) =>\n    IpcAppPages.SupportedPages.Contains(page.Trim().ToLowerInvariant(), StringComparer.OrdinalIgnoreCase);","tryCatchPattern":"try { IpcAppPages.NormalizePageName(page); }\ncatch (InvalidOperationException ex) { Logger.Warn(ex.Message); /* show supported list to user */ }","preventionTips":["Populate navigation UI from IpcAppPages.SupportedPages rather than hardcoding page names.","Use ToPageName to convert PascalCase type names to canonical keys before normalizing.","Watch for singular/plural mismatches (\"updates\" not \"update\")."],"tags":["ipc","navigation","validation","ui"],"backgroundTag":null,"analyzedSha":"9b1d7d0eab91620fc15c86b36676532095936ae3","analyzedAt":"2026-08-13T12:19:18.278Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}