{"record":{"id":"a6b56a59fc4c58be","repo":"larksuite/cli","slug":"plugin-q-v","errorCode":null,"errorMessage":"plugin %q: %v","messagePattern":"plugin %q: (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"extension/platform/builder.go","lineNumber":230,"sourceCode":"\t\tcaps:          b.caps,\n\t\tactions:       b.actions,\n\t\trules:         b.rules,\n\t\tskillsOverlay: b.skillsOverlay,\n\t}, nil\n}\n\n// MustBuild panics if Build() would return an error. Designed for\n// init():\n//\n//\tfunc init() { platform.Register(platform.NewPlugin(...).MustBuild()) }\n//\n// A panic in init runs before the framework's recover guard is\n// installed and will crash the binary. That is the intended\n// behaviour: a misconfigured plugin must NOT be silently registered.\nfunc (b *Builder) MustBuild() Plugin {\n\tp, err := b.Build()\n\tif err != nil {\n\t\tpanic(fmt.Sprintf(\"plugin %q: %v\", b.name, err))\n\t}\n\treturn p\n}\n\n// validateHookName checks the grammar and uniqueness; returns false\n// when the name was rejected (caller skips the action).\nfunc (b *Builder) validateHookName(hookName, kind string) bool {\n\tif !pluginNamePattern.MatchString(hookName) {\n\t\tb.errs = append(b.errs, fmt.Errorf(\n\t\t\t\"%s %q: hookName must match ^[a-z0-9][a-z0-9-]*$\", kind, hookName))\n\t\treturn false\n\t}\n\tif b.hookNames[hookName] {\n\t\tb.errs = append(b.errs, fmt.Errorf(\n\t\t\t\"%s %q: hookName already used in this plugin\", kind, hookName))\n\t\treturn false\n\t}\n\tb.hookNames[hookName] = true","sourceCodeStart":212,"sourceCodeEnd":248,"githubUrl":"https://github.com/larksuite/cli/blob/7fd6ef3c07182257ce776cdc5a614e122d5bd4b3/extension/platform/builder.go#L212-L248","documentation":"Message for the panic raised by Builder.MustBuild when Build() fails: a misconfigured plugin (invalid name, capabilities, actions, rules, etc.) must crash at init time rather than be silently registered. The underlying Build error is embedded.","triggerScenarios":"Thrown at extension/platform/builder.go:230 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the Builder configuration error reported after the colon"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7fd6ef3c07182257ce776cdc5a614e122d5bd4b3","analyzedAt":"2026-09-04T21:17:44.649Z","contentChangedAt":"2026-09-04T21:17:44.649Z","schemaVersion":2},"datasetVersion":"2026-09-12T02:17:10.037Z"}