{"record":{"id":"cd77947e527d0b15","repo":"gastownhall/beads","slug":"loadcreatecontext-read-infra-types-w","errorCode":null,"errorMessage":"LoadCreateContext: read infra types: %w","messagePattern":"LoadCreateContext: read infra types: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/storage/domain/config.go","lineNumber":265,"sourceCode":"\tprefix, err := u.cfgRepo.GetConfig(ctx, \"issue_prefix\")\n\tif err != nil {\n\t\treturn CreateContext{}, fmt.Errorf(\"LoadCreateContext: read issue_prefix: %w\", err)\n\t}\n\tallowed, err := u.cfgRepo.GetAllowedPrefixes(ctx)\n\tif err != nil {\n\t\treturn CreateContext{}, fmt.Errorf(\"LoadCreateContext: read allowed_prefixes: %w\", err)\n\t}\n\tcustomTypes, err := u.cfgRepo.GetCustomTypes(ctx)\n\tif err != nil {\n\t\treturn CreateContext{}, fmt.Errorf(\"LoadCreateContext: read custom types: %w\", err)\n\t}\n\tcustomStatuses, err := u.cfgRepo.GetCustomStatuses(ctx)\n\tif err != nil {\n\t\treturn CreateContext{}, fmt.Errorf(\"LoadCreateContext: read custom statuses: %w\", err)\n\t}\n\tinfraTypes, err := u.GetInfraTypes(ctx)\n\tif err != nil {\n\t\treturn CreateContext{}, fmt.Errorf(\"LoadCreateContext: read infra types: %w\", err)\n\t}\n\treturn CreateContext{\n\t\tIssuePrefix:     prefix,\n\t\tAllowedPrefixes: allowed,\n\t\tCustomTypes:     customTypes,\n\t\tCustomStatuses:  customStatuses,\n\t\tInfraTypes:      infraTypes,\n\t}, nil\n}\n","sourceCodeStart":247,"sourceCodeEnd":275,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/internal/storage/domain/config.go#L247-L275","documentation":"Wrapping error from ConfigUseCaseImpl.LoadCreateContext at internal/storage/domain/config.go:265. Raised when u.GetInfraTypes(ctx) fails — the final read before returning the CreateContext struct. Note this read goes through the use case itself (GetInfraTypes) rather than directly through the repo, so the wrapped cause may itself be another use-case-level error.","triggerScenarios":"Calling LoadCreateContext when GetInfraTypes fails — underlying repository error reading infra-type configuration, connection failure, or cancelled context on the last leg of the multi-read sequence.","commonSituations":"Infra types feature enabled but its config store missing/corrupted; transient DB failure at the end of a long read sequence; version mismatch where infra-type tables don't exist yet.","solutions":["Unwrap to find the storage-level cause","Verify infra-type config tables exist (check for schema/migration gaps)","Confirm the GetInfraTypes path itself is healthy (test it directly)","Retry once storage is healthy"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// verify infra types are readable before create flows\nif _, err := uc.GetInfraTypes(ctx); err != nil {\n\treturn fmt.Errorf(\"infra types unreadable, check schema: %w\", err)\n}","typeGuard":null,"tryCatchPattern":"cc, err := uc.LoadCreateContext(ctx)\nif err != nil && strings.Contains(err.Error(), \"read infra types\") {\n\tif isMissingTableErr(errors.Unwrap(err)) {\n\t\trunMigrations() // create missing infra-type tables\n\t\tcc, err = uc.LoadCreateContext(ctx)\n\t}\n\treturn err\n}\nreturn nil","preventionTips":["Confirm infra-type tables exist for your bd version before relying on the feature","Call GetInfraTypes directly when debugging to isolate the failing layer","Apply pending migrations after upgrades","Keep context deadlines sufficient for the full read sequence"],"tags":["config","infra-types","storage","error-wrapping"],"backgroundTag":"config-read-failed","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}