{"record":{"id":"4be0a45283f36708","repo":"crowdsecurity/crowdsec","slug":"errfeaturenameempty","errorCode":"ErrFeatureNameEmpty","errorMessage":"name is empty","messagePattern":"name is empty","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/fflag/features.go","lineNumber":43,"sourceCode":"// that has been decided when the flag is/was finally retired.\n\npackage fflag\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"regexp\"\n\t\"sort\"\n\t\"strings\"\n\n\t\"github.com/goccy/go-yaml\"\n\t\"github.com/sirupsen/logrus\"\n)\n\nvar (\n\tErrFeatureNameEmpty   = errors.New(\"name is empty\")\n\tErrFeatureNameCase    = errors.New(\"name is not lowercase\")\n\tErrFeatureNameInvalid = errors.New(\"invalid name (allowed a-z, 0-9, _, .)\")\n\tErrFeatureUnknown     = errors.New(\"unknown feature\")\n\tErrFeatureDeprecated  = errors.New(\"the flag is deprecated\")\n\tErrFeatureRetired     = errors.New(\"the flag is retired\")\n)\n\nconst (\n\tActiveState     = iota // the feature can be enabled, and its description is logged (Info)\n\tDeprecatedState        // the feature can be enabled, and a deprecation message is logged (Warning)\n\tRetiredState           // the feature is ignored and a deprecation message is logged (Error)\n)\n\ntype Feature struct {\n\tName  string\n\tState int // active, deprecated, retired\n\n\t// Description should be a short sentence, explaining the feature.","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/crowdsecurity/crowdsec/blob/909b5157986a2b2c2163300fdaef5ed01289f7d2/pkg/fflag/features.go#L25-L61","documentation":"Sentinel error ErrFeatureNameEmpty returned by validateFeatureName when a feature flag is registered or looked up with an empty name string. It is a generic guard on the featureName input, which must be a non-empty lowercase identifier.","triggerScenarios":"Thrown at pkg/fflag/features.go:43 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Give the feature a non-empty name in the feature flag definition/config"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"909b5157986a2b2c2163300fdaef5ed01289f7d2","analyzedAt":"2026-09-06T12:27:26.012Z","contentChangedAt":"2026-09-06T12:27:26.012Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}