{"record":{"id":"e1d50107e86d6cae","repo":"Devolutions/UniGetUI","slug":"no-setting-matching-settingkey-was-found","errorCode":null,"errorMessage":"No setting matching \"{settingKey}\" was found.","messagePattern":"No setting matching \"(.+?)\" was found\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/UniGetUI.Interface.IpcApi/IpcManagerSettingsApi.cs","lineNumber":521,"sourceCode":"        {\n            if (!IsVisibleSetting(candidate))\n            {\n                continue;\n            }\n\n            if (\n                candidate.ToString().Equals(settingKey, StringComparison.OrdinalIgnoreCase)\n                || Settings.ResolveKey(candidate).Equals(\n                    settingKey,\n                    StringComparison.OrdinalIgnoreCase\n                )\n            )\n            {\n                return candidate;\n            }\n        }\n\n        throw new InvalidOperationException($\"No setting matching \\\"{settingKey}\\\" was found.\");\n    }\n\n    private static IpcSettingInfo ToSettingInfo(Settings.K setting)\n    {\n        string stringValue = Settings.GetValue(setting);\n        bool isSet = Settings.Get(setting);\n\n        return new IpcSettingInfo\n        {\n            Name = setting.ToString(),\n            Key = Settings.ResolveKey(setting),\n            IsSet = isSet,\n            BoolValue = isSet,\n            StringValue = stringValue,\n            HasStringValue = !string.IsNullOrWhiteSpace(stringValue),\n        };\n    }\n}","sourceCodeStart":503,"sourceCodeEnd":539,"githubUrl":"https://github.com/Devolutions/UniGetUI/blob/9b1d7d0eab91620fc15c86b36676532095936ae3/src/UniGetUI.Interface.IpcApi/IpcManagerSettingsApi.cs#L503-L539","documentation":"Thrown by ResolveSettingKey when the provided setting key does not match any visible Settings.K enum value. Matching is attempted two ways: the enum member name (e.g., 'EnableScoopCleanup') and the resolved key string from Settings.ResolveKey(candidate), both case-insensitive. Hidden settings (CurrentSessionToken, TelemetryClientToken) and Settings.K.Unset are excluded from matching.","triggerScenarios":"Calling GetSetting/SetSetting/ClearSetting with a key that is neither an enum member name nor a resolved key string of any visible setting. Using a deprecated setting name after an enum rename. Using a display label instead of the programmatic key.","commonSituations":"Setting was renamed in a newer version and old key string no longer matches. Typo in the setting key. Attempting to set a hidden setting (CurrentSessionToken/TelemetryClientToken) — these are filtered out and won't match even with the correct enum name. Using a UI-facing label instead of the programmatic key.","solutions":["Call ListSettings() to get all valid keys and their resolved key strings.","Check for typos — matching is case-insensitive but otherwise exact.","If the setting was renamed, update to the new enum name or resolved key."],"exampleFix":"// before — using a stale or incorrect key\nvar info = IpcManagerSettingsApi.GetSetting(\"ScoopCleanup\");\n// after — look up the correct key\nvar settings = IpcManagerSettingsApi.ListSettings();\nvar match = settings.FirstOrDefault(s =>\n    s.Key.Equals(\"ScoopCleanup\", StringComparison.OrdinalIgnoreCase)\n    || s.Name.Equals(\"ScoopCleanup\", StringComparison.OrdinalIgnoreCase));\nif (match is null) throw new KeyNotFoundException(\"Setting not found.\");\nvar info = IpcManagerSettingsApi.GetSetting(match.Key);","handlingStrategy":"validation","validationCode":"var validKeys = IpcManagerSettingsApi.ListSettings()\n    .SelectMany(s => new[] { s.Name, s.Key })\n    .ToHashSet(StringComparer.OrdinalIgnoreCase);\nif (!validKeys.Contains(settingKey))\n    throw new ArgumentException($\"Unknown setting key: {settingKey}\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Call ListSettings() to discover valid keys before using GetSetting/SetSetting/ClearSetting.","Hidden settings (CurrentSessionToken, TelemetryClientToken) are excluded and won't match.","Matching accepts both the enum name and the resolved key string, case-insensitively."],"tags":["settings","ipc","validation","lookup"],"backgroundTag":null,"analyzedSha":"9b1d7d0eab91620fc15c86b36676532095936ae3","analyzedAt":"2026-08-13T12:19:18.278Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}