larksuite/cli · error

schema maxLength: %w

Error message

schema maxLength: %w

What it means

Schema tag guard: the maxLength value could not be parsed as a nonnegative integer (wraps parseNonnegativeInt error).

Source

Thrown at shortcuts/common/typed_compile_args.go:463

			if !hasValue || value == "" {
				return result, fmt.Errorf("schema enum requires at least one value")
			}
			result.enum = strings.Split(value, "|")
		case "format":
			if !hasValue || value == "" {
				return result, fmt.Errorf("schema format requires a name")
			}
			result.format = value
		case "minLength":
			v, err := parseNonnegativeInt(value)
			if err != nil {
				return result, fmt.Errorf("schema minLength: %w", err)
			}
			result.minLength = &v
		case "maxLength":
			v, err := parseNonnegativeInt(value)
			if err != nil {
				return result, fmt.Errorf("schema maxLength: %w", err)
			}
			result.maxLength = &v
		case "minimum":
			v, err := parseFiniteFloat(value)
			if err != nil {
				return result, fmt.Errorf("schema minimum: %w", err)
			}
			result.minimum = &v
		case "maximum":
			v, err := parseFiniteFloat(value)
			if err != nil {
				return result, fmt.Errorf("schema maximum: %w", err)
			}
			result.maximum = &v
		case "minItems":
			v, err := parseNonnegativeInt(value)
			if err != nil {
				return result, fmt.Errorf("schema minItems: %w", err)

View on GitHub (pinned to 7fd6ef3c07)

Solutions

  1. Use a nonnegative integer for maxLength
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at shortcuts/common/typed_compile_args.go:463 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/2523b7bc1d2a728a. Report an issue: GitHub.