errors

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2026 License: MIT Imports: 0 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ErrEndpointNotEnabled     = "endpoint not enabled by mandatory feature flags disabled"
	ErrNotFunctionKind        = "expected a function, got %s"
	ErrFunctionNoMatchingArgs = "function expects %d arguments, got %d"
	ErrCheckingFeatureFlags   = "error checking feature flags: %w"
	ErrFunctionNotEnabled     = "function not enabled because not all required feature flags are enabled"
	ErrFeatureFlagNotFound    = "feature flag '%s' does not exist"
	ErrNoFeatureFlagsFound    = "no feature flags found"
	ErrNotSupportedOperation  = "not supported operation over feature flag"

	ErrParseDocument            = "parse %s document: %w"
	ErrDocumentTrailingData     = "parse %s document: unexpected data after the JSON object"
	ErrUnsupportedSchemaVersion = "%s document: unsupported schema_version %d, want %d"
	ErrNotInteger               = "%s: %s is not an integer"

	ErrEngineNilDocument      = "engine: %s document is nil"
	ErrEngineCompileRule      = "flag %q rule %d %q: %w"
	ErrEngineCompileCondition = "if[%d]: %w"
	ErrEngineCompileRollout   = "rollout: %w"
	ErrEngineBadPercentage    = "percentage %d is outside 0..100"
	ErrEngineUnknownAttribute = "attribute %q is not in the catalog"
	ErrEngineUnknownOperator  = "operator %q is not built in or declared in the catalog"
	ErrEngineOperator         = "operator %q: %w"
	ErrEngineUnknownGroup     = "group %q does not exist"
	ErrEngineGroupAttribute   = "group %q is over attribute %q, not %q"
	ErrEngineGroup            = "group %q: %w"
	ErrEngineAttributeType    = "attribute %q is %s, the operator needs %s"
	ErrEngineValueShape       = "value must be %s"
	ErrEngineValueType        = "value %v is not a valid %s"
	ErrEngineBadRegex         = "invalid regular expression %q: %w"

	ErrValidateNilDocument      = "validate: %s document is nil"
	ErrValidateInvalid          = "feature flags are invalid (%d problems):\n%s"
	ErrValidateBadName          = "%s name %q must match %s"
	ErrValidateUnknownAttribute = "attribute %q is not in the catalog"
	ErrValidateUnknownOperator  = "operator %q is neither built-in nor in the catalog"
	ErrValidateUnknownGroup     = "group %q does not exist"
	ErrValidateGroupAttribute   = "group %q is over attribute %q, not %q"
	ErrValidateGroupSize        = "group has %d values, want 1 to %d"
	ErrValidateDuplicateValue   = "value %s is listed twice"
	ErrValidateValueType        = "value %s is not a valid %s"
	ErrValidateValueShape       = "operator %q needs %s"
	ErrValidateAttributeType    = "operator %q needs %s attribute, %q is %s"
	ErrValidateBadRegex         = "invalid regular expression %q: %v"
	ErrValidateBadPercentage    = "percentage %d is outside 0..100"
	ErrValidateRequired         = "%s is required"
	ErrValidateBadJira          = "jira %q must look like PROJ-123"
	ErrValidateBadDate          = "remove_after %q must be a date (YYYY-MM-DD)"
	ErrValidateBadRuleName      = "rule name must be 1 to %d characters"
	ErrValidateBadType          = "type %q must be string, integer, number or boolean"
	ErrValidateShadowsBuiltin   = "custom operator %q has the name of a built-in operator"
	ErrValidateNegatedOperator  = "custom operator %q starts with %s, which negates an operator"
	ErrValidateResolverUnknown  = "resolver for %q: attribute is not in the catalog"
	ErrValidateDocumentTooLarge = "document is %d bytes, over the AppConfig limit of %d bytes"
	ErrValidateAttributeRetyped = "attribute %q changed type from %s to %s; callers sending the old type stop matching"

	WarnValidateDuplicateRule = "same name as rules[%d]; rules run in order, so this one only applies to callers rules[%d] did not match"
	WarnValidateDocumentSize  = "document is %d bytes, over %d%% of the AppConfig limit of %d bytes"

	ErrEngineUnregisteredOperator = "operator %q is declared in the catalog but not registered"
	ErrEngineCompileResolver      = "resolver %q: %w"
	ErrEngineMetrics              = "engine metrics: %w"

	ErrRegistryNilFunc      = "%s %q: function is nil"
	ErrRegistryOperatorName = "operator %q: name is empty, built in or starts with not_"
	ErrRegistryResolverName = "resolver: attribute name is empty"
	ErrRegistryDuplicate    = "%s %q is already registered"

	ErrUnsupportedProvider        = "unsupported provider: %s"
	ErrInvalidAppConfigConfigType = "invalid config type for appconfig provider, want provider.AppConfigConfig"
	ErrEnvPrefixRequired          = "config env prefix is required"
	ErrEnvCompile                 = "compile env flags: %w"
	ErrMetricsInstrument          = "create metric %s: %w"
	ErrAppConfigMissingTarget     = "appconfig application and environment are required"
	ErrAppConfigPollInterval      = "appconfig poll interval %s is below the minimum %s"
	ErrAppConfigLoadAWSConfig     = "failed to load AWS config: %w"
	ErrAppConfigStartSession      = "start AppConfig session for profile %s: %w"
	ErrAppConfigGetLatest         = "get latest AppConfig configuration for profile %s: %w"
	ErrAppConfigFetch             = "fetch AppConfig profile %s: %v"
	ErrAppConfigInvalidVersion    = "AppConfig profile %s: new version rejected, keeping the previous snapshot: %v"
	ErrAppConfigNoContent         = "profile has no content yet"

	ErrValidatorMissingEnv      = "validator: environment variable %s is required"
	ErrValidatorBadEvent        = "validator: event is missing %s"
	ErrValidatorDecodeContent   = "validator: content of version %s is not base64: %w"
	ErrValidatorGetProfile      = "validator: look up configuration profile %s: %w"
	ErrValidatorUnknownProfile  = "validator: profile %q is neither feature-flags nor catalog"
	ErrValidatorReadDeployed    = "validator: read deployed %s in environment %s: %w"
	ErrValidatorDeployedInvalid = "validator: deployed %s in environment %s does not parse: %w"
	ErrValidatorNoCatalog       = "no catalog is deployed in environment %s; deploy the catalog first"
	ErrValidatorBreaksFlags     = "this catalog breaks the feature flags deployed in environment %s: %w"
)

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL