{"record":{"id":"ab7a9262a5b1a152","repo":"sipeed/picoclaw","slug":"invalid-gateway-port-d-port-must-be-between-1-a","errorCode":null,"errorMessage":"invalid gateway port: %d, port must be between 1 and 65535","messagePattern":"invalid gateway port: (.+?), port must be between 1 and 65535","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/gateway/gateway.go","lineNumber":307,"sourceCode":"\t\t\t}\n\t\t\tif err = newCfg.ValidateModelList(); err != nil {\n\t\t\t\tlogger.Errorf(\"Config validation failed: %v\", err)\n\t\t\t\trunningServices.reloading.Store(false)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\terr = executeReload(ctx, agentLoop, newCfg, &provider, runningServices, msgBus, allowEmptyStartup, debug)\n\t\t\tif err != nil {\n\t\t\t\tlogger.Errorf(\"Manual reload failed: %v\", err)\n\t\t\t} else {\n\t\t\t\tlogger.Info(\"Manual reload completed successfully\")\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc preCheckConfig(cfg *config.Config) error {\n\tif cfg.Gateway.Port <= 0 || cfg.Gateway.Port > 65535 {\n\t\treturn fmt.Errorf(\"invalid gateway port: %d, port must be between 1 and 65535\", cfg.Gateway.Port)\n\t}\n\treturn nil\n}\n\ntype gatewayStartupStatus struct {\n\ttoolsCount      int\n\tskillsAvailable int\n\tskillsTotal     int\n\tlogFields       map[string]any\n}\n\nfunc collectGatewayStartupStatus(startupInfo map[string]any) gatewayStartupStatus {\n\tstatus := gatewayStartupStatus{logFields: map[string]any{}}\n\n\tif toolsInfo, ok := startupInfo[\"tools\"].(map[string]any); ok {\n\t\tif count, ok := startupInfoInt(toolsInfo[\"count\"]); ok {\n\t\t\tstatus.toolsCount = count\n\t\t\tstatus.logFields[\"tools_count\"] = count","sourceCodeStart":289,"sourceCodeEnd":325,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/gateway/gateway.go#L289-L325","documentation":"Error \"invalid gateway port: %d, port must be between 1 and 65535\" thrown in sipeed/picoclaw.","triggerScenarios":"Thrown at pkg/gateway/gateway.go:307 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"}