{"record":{"id":"23706f85ec3437ff","repo":"tinyhumansai/openhuman","slug":"invalid-port-value-raw","errorCode":null,"errorMessage":"invalid --port value `{raw}`","messagePattern":"invalid --port value `(.+?)`","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/mcp/server/stdio.rs","lineNumber":59,"sourceCode":"                    \"http\" => McpTransport::Http,\n                    other => bail!(\"unknown --transport value `{other}` (expected stdio or http)\"),\n                };\n                index += 2;\n            }\n            \"--host\" => {\n                bind_host = args\n                    .get(index + 1)\n                    .ok_or_else(|| anyhow::anyhow!(\"missing value for --host\"))?\n                    .clone();\n                index += 2;\n            }\n            \"--port\" => {\n                let raw = args\n                    .get(index + 1)\n                    .ok_or_else(|| anyhow::anyhow!(\"missing value for --port\"))?;\n                port = raw\n                    .parse()\n                    .map_err(|_| anyhow::anyhow!(\"invalid --port value `{raw}`\"))?;\n                index += 2;\n            }\n            \"--auth-token\" => {\n                let token = args\n                    .get(index + 1)\n                    .ok_or_else(|| anyhow::anyhow!(\"missing value for --auth-token\"))?;\n                if token.trim().is_empty() {\n                    bail!(\"--auth-token must not be empty\");\n                }\n                auth_token = Some(token.trim().to_string());\n                index += 2;\n            }\n            \"-h\" | \"--help\" => {\n                print_help();\n                return Ok(());\n            }\n            other => bail!(\"unknown mcp arg: {other}\"),\n        }","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/mcp/server/stdio.rs#L41-L77","documentation":"CLI argument parsing in run_stdio_from_cli: the value following `--port` failed u16 parsing (out of range 0–65535 or non-numeric). Usage error, not a network failure — the MCP HTTP server never starts. Re-run with a valid port, e.g. `--port 9300` (the default).","triggerScenarios":"Thrown at src/openhuman/mcp/server/stdio.rs:59 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a decimal port between 0 and 65535 (e.g. 9300)","Remove quotes, spaces or unit suffixes from the value"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}