crowdsecurity/crowdsec · error
ErrFeatureNameEmpty
ErrFeatureNameEmpty
Error message
name is empty
What it means
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.
Source
Thrown at pkg/fflag/features.go:43
// that has been decided when the flag is/was finally retired.
package fflag
import (
"errors"
"fmt"
"io"
"os"
"regexp"
"sort"
"strings"
"github.com/goccy/go-yaml"
"github.com/sirupsen/logrus"
)
var (
ErrFeatureNameEmpty = errors.New("name is empty")
ErrFeatureNameCase = errors.New("name is not lowercase")
ErrFeatureNameInvalid = errors.New("invalid name (allowed a-z, 0-9, _, .)")
ErrFeatureUnknown = errors.New("unknown feature")
ErrFeatureDeprecated = errors.New("the flag is deprecated")
ErrFeatureRetired = errors.New("the flag is retired")
)
const (
ActiveState = iota // the feature can be enabled, and its description is logged (Info)
DeprecatedState // the feature can be enabled, and a deprecation message is logged (Warning)
RetiredState // the feature is ignored and a deprecation message is logged (Error)
)
type Feature struct {
Name string
State int // active, deprecated, retired
// Description should be a short sentence, explaining the feature.View on GitHub (pinned to 909b515798)
Solutions
- Give the feature a non-empty name in the feature flag definition/config
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at pkg/fflag/features.go:43 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of crowdsecurity/crowdsec@909b515798 (2026-09-06).
Data as JSON: /api/errors/4be0a45283f36708.
Report an issue: GitHub.