{"record":{"id":"5edad9499132c680","repo":"sipeed/picoclaw","slug":"invalid-gateway-host-w","errorCode":null,"errorMessage":"invalid gateway host: %w","messagePattern":"invalid gateway host: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/config/config.go","lineNumber":1531,"sourceCode":"\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}\n\tif err = cfg.ValidateTurnProfile(); err != nil {\n\t\treturn nil, err\n\t}\n\tcfg.Gateway.Host, err = resolveGatewayHostFromEnv(gatewayHostBeforeEnv)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"invalid gateway host: %w\", err)\n\t}\n\n\t// Expand multi-key configs into separate entries for key-level failover\n\tcfg.ModelList = expandMultiKeyModels(cfg.ModelList)\n\n\t// Validate model_list for uniqueness and required fields\n\tif err = cfg.ValidateModelList(); err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Ensure Workspace has a default if not set\n\tif cfg.Agents.Defaults.Workspace == \"\" {\n\t\thomePath := GetHome()\n\t\tcfg.Agents.Defaults.Workspace = filepath.Join(homePath, pkg.WorkspaceName)\n\t}\n\n\tcfg.Session.ApplyDmScope()\n\tcfg.Session.DeriveDmScope()","sourceCodeStart":1513,"sourceCodeEnd":1549,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/config/config.go#L1513-L1549","documentation":"Wraps a failure from resolveGatewayHostFromEnv during LoadConfig: the configured or env-resolved gateway bind host is not a valid address. LoadConfig returns this so startup fails fast instead of opening listeners on an unusable host.","triggerScenarios":"Thrown at pkg/config/config.go:1531 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the gateway.host value in config.json and any host environment override for typos or invalid values","Use a valid bind address such as 127.0.0.1, 0.0.0.0, or a resolvable hostname","Remove an empty or malformed host env override so the default is used"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","contentChangedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}