{"record":{"id":"ecf7626dc76508da","repo":"sipeed/picoclaw","slug":"failed-to-load-security-config-w","errorCode":null,"errorMessage":"failed to load security config: %w","messagePattern":"failed to load security config: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/config/config.go","lineNumber":1507,"sourceCode":"\t\t\t\"config migrate success\",\n\t\t\tmap[string]any{\"from\": versionInfo.Version, \"to\": CurrentVersion},\n\t\t)\n\tcase CurrentVersion:\n\t\t// Current version\n\t\tcfg, err = loadConfig(data)\n\t\tif err != nil {\n\t\t\tlogger.ErrorCF(\n\t\t\t\t\"config\",\n\t\t\t\tformatDiagnosticLogMessage(\"Failed to load config\", err),\n\t\t\t\tmap[string]any{\"path\": path},\n\t\t\t)\n\t\t\treturn nil, err\n\t\t}\n\t\t// Load security configuration\n\t\tsecPath := securityPath(path)\n\t\terr = loadSecurityConfig(cfg, secPath)\n\t\tif err != nil && !errors.Is(err, os.ErrNotExist) {\n\t\t\treturn nil, fmt.Errorf(\"failed to load security config: %w\", err)\n\t\t}\n\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unsupported config version: %d\", versionInfo.Version)\n\t}\n\n\tapplyLegacyBindingsMigration(data, cfg)\n\n\tgatewayHostBeforeEnv := cfg.Gateway.Host\n\n\tif err = env.Parse(cfg); err != nil {\n\t\treturn nil, err\n\t}\n\tapplySkillsRegistryEnvCompat(cfg)\n\n\tif err = InitChannelList(cfg.Channels); err != nil {\n\t\treturn nil, err\n\t}","sourceCodeStart":1489,"sourceCodeEnd":1525,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/config/config.go#L1489-L1525","documentation":"Error \"failed to load security config: %w\" thrown in sipeed/picoclaw.","triggerScenarios":"Thrown at pkg/config/config.go:1507 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}