{"record":{"id":"00066bd3ec23433b","repo":"aspnetboilerplate/aspnetboilerplate","slug":"there-is-no-feature-with-name-name","errorCode":null,"errorMessage":"There is no feature with name: {name}","messagePattern":"There is no feature with name: (.+?)","errorType":"exception","errorClass":"AbpException","httpStatus":null,"severity":"error","filePath":"src/Abp/Application/Features/FeatureManager.cs","lineNumber":52,"sourceCode":"                using (var provider = CreateProvider(providerType))\n                {\n                    provider.Object.SetFeatures(this);\n                }\n            }\n\n            Features.AddAllFeatures();\n        }\n\n        /// <summary>\n        /// Gets a feature by its given name\n        /// </summary>\n        /// <param name=\"name\">Name of the feature</param>\n        public Feature Get(string name)\n        {\n            var feature = GetOrNull(name);\n            if (feature == null)\n            {\n                throw new AbpException(\"There is no feature with name: \" + name);\n            }\n\n            return feature;\n        }\n\n        /// <summary>\n        /// Gets all the features\n        /// </summary>\n        public IReadOnlyList<Feature> GetAll()\n        {\n            return Features.Values.ToImmutableList();\n        }\n\n        private IDisposableDependencyObjectWrapper<FeatureProvider> CreateProvider(Type providerType)\n        {\n            return _iocManager.ResolveAsDisposable<FeatureProvider>(providerType);\n        }\n    }","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/aspnetboilerplate/aspnetboilerplate/blob/2323c13a152aa0ebfb37af3830f687d7f5b53795/src/Abp/Application/Features/FeatureManager.cs#L34-L70","documentation":"Thrown by FeatureManager.Get when GetOrNull(name) returns null — i.e., no Feature with that name is registered in the feature definition dictionary. Unlike the TryGet-style API, Get is the strict accessor and throws AbpException for unknown names.","triggerScenarios":"Calling FeatureManager.Get(\"SomeFeature\") (directly or via feature value APIs that resolve definitions) with a name never registered by any FeatureProvider, or after the provider defining it was removed.","commonSituations":"Typo in feature name string; feature defined in a module not loaded in this environment; renaming a feature in code while old persisted feature values/settings still reference the old name; tests missing module registration.","solutions":["Fix the feature name string to match the registered definition exactly.","Register the feature in a FeatureProvider added to Configuration.Features.Providers.","Use GetOrNull or IsEnabled instead of Get when absence is an expected case.","Migrate persisted feature settings that reference renamed/removed features."],"exampleFix":"// before\nvar feature = featureManager.Get(\"ExportData\"); // not registered\n\n// after\nvar feature = featureManager.GetOrNull(\"MyApp.ExportData\");\nif (feature == null) { /* handle missing definition */ }","handlingStrategy":"type-guard","validationCode":"var feature = featureManager.GetOrNull(name);\nif (feature == null)\n{\n    Logger.Warn($\"Unknown feature: {name}\");\n    return false;\n}","typeGuard":"bool FeatureExists(FeatureManager fm, string name) => fm.GetOrNull(name) != null;","tryCatchPattern":"try { return featureManager.Get(name); }\ncatch (AbpException ex) when (ex.Message.StartsWith(\"There is no feature with name\"))\n{\n    Logger.Warn($\"Feature not registered: {name}\");\n    return null;\n}","preventionTips":["Reference feature names via constants shared with the provider.","Use GetOrNull/IsEnabled instead of Get when absence is expected.","Ensure the module defining the feature is loaded in every environment.","Write a startup test that resolves all referenced feature names."],"tags":["features","resource-not-found","abp"],"backgroundTag":"record-not-found","analyzedSha":"2323c13a152aa0ebfb37af3830f687d7f5b53795","analyzedAt":"2026-09-08T08:00:50.638Z","contentChangedAt":"2026-09-08T08:00:50.638Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}