larksuite/cli · error

L1: name must not be empty

Error message

L1: name must not be empty

What it means

First L1 structural check in lintEnvelope: a command schema Envelope was submitted with an empty Name, so the envelope cannot identify the command it describes. Part of the schema compliance lint - an empty error slice means the envelope is compliant.

Source

Thrown at internal/schema/lint.go:34

	"number":  true,
	"boolean": true,
	"array":   true,
	"object":  true,
}

var validAccessTokens = map[string]bool{
	"user": true,
	"bot":  true,
}

// lintEnvelope runs L1-L3 checks and returns a list of errors. Empty slice
// means the envelope is compliant.
func lintEnvelope(env Envelope) []error {
	var errs []error

	// ---- L1: structural ----
	if env.Name == "" {
		errs = append(errs, errors.New("L1: name must not be empty"))
	}
	if env.InputSchema == nil {
		errs = append(errs, errors.New("L1: inputSchema must not be nil"))
	} else {
		if env.InputSchema.Type != "object" {
			errs = append(errs, fmt.Errorf("L1: inputSchema.type = %q, want \"object\"", env.InputSchema.Type))
		}
		if env.InputSchema.Properties == nil {
			errs = append(errs, errors.New("L1: inputSchema.properties must not be nil"))
		}
	}
	if env.OutputSchema == nil {
		errs = append(errs, errors.New("L1: outputSchema must not be nil"))
	} else {
		if env.OutputSchema.Type != "object" {
			errs = append(errs, fmt.Errorf("L1: outputSchema.type = %q, want \"object\"", env.OutputSchema.Type))
		}
	}

View on GitHub (pinned to 7fd6ef3c07)

Solutions

  1. Populate Envelope.Name with the command's non-empty schema name before publishing
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at internal/schema/lint.go:34 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of larksuite/cli@7fd6ef3c07 (2026-09-04). Data as JSON: /api/errors/46116ef441bd9d8e. Report an issue: GitHub.