{"record":{"id":"b10527feedf26438","repo":"caddyserver/caddy","slug":"loading-configs-from-storage-w","errorCode":null,"errorMessage":"loading configs from storage: %w","messagePattern":"loading configs from storage: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"modules/caddytls/ech.go","lineNumber":114,"sourceCode":"\n\t// the rest of provisioning needs an exclusive lock so that instances aren't\n\t// stepping on each other when setting up ECH configs\n\tstorage := ctx.Storage()\n\tif err := storage.Lock(ctx, echStorageLockName); err != nil {\n\t\treturn nil, err\n\t}\n\tdefer func() {\n\t\tif err := storage.Unlock(ctx, echStorageLockName); err != nil {\n\t\t\tlogger.Error(\"unable to unlock ECH provisioning in storage\", zap.Error(err))\n\t\t}\n\t}()\n\n\tech.configsMu.Lock()\n\tdefer ech.configsMu.Unlock()\n\n\touterNames, err := ech.setConfigsFromStorage(ctx, logger)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"loading configs from storage: %w\", err)\n\t}\n\n\t// see if we need to make any new ones based on the input configuration\n\tfor _, cfg := range ech.Configs {\n\t\tpublicName := strings.ToLower(strings.TrimSpace(cfg.PublicName))\n\n\t\tif list, ok := ech.configs[publicName]; !ok || len(list) == 0 {\n\t\t\t// no config with this public name was loaded, so create one\n\t\t\techCfg, err := generateAndStoreECHConfig(ctx, publicName)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tlogger.Debug(\"generated new ECH config\",\n\t\t\t\tzap.String(\"public_name\", echCfg.RawPublicName),\n\t\t\t\tzap.Uint8(\"id\", echCfg.ConfigID))\n\t\t\tech.configs[publicName] = append(ech.configs[publicName], echCfg)\n\t\t\touterNames = append(outerNames, publicName)\n\t\t}","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/caddyserver/caddy/blob/50e54ee279aa1e504fe218ca49ab6ae16c100410/modules/caddytls/ech.go#L96-L132","documentation":"Error \"loading configs from storage: %w\" thrown in caddyserver/caddy.","triggerScenarios":"Thrown at modules/caddytls/ech.go:114 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the storage backend; ECH configs could not be read. The data may be corrupted or storage unreachable."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"50e54ee279aa1e504fe218ca49ab6ae16c100410","analyzedAt":"2026-08-15T09:20:21.641Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}