{"record":{"id":"c080629123148cae","repo":"zed-industries/zed","slug":"missing-port-forward-format","errorCode":null,"errorMessage":"Missing port forward format","messagePattern":"Missing port forward format","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/remote/src/transport/ssh.rs","lineNumber":1704,"sourceCode":"            }\n            if arg == \"-l\" {\n                username = tokens.next();\n                continue;\n            } else if let Some(l) = arg.strip_prefix(\"-l\") {\n                username = Some(l.to_string());\n                continue;\n            }\n            if arg == \"-L\" || arg.starts_with(\"-L\") {\n                let forward_spec = if arg == \"-L\" {\n                    tokens.next()\n                } else {\n                    Some(arg.strip_prefix(\"-L\").unwrap().to_string())\n                };\n\n                if let Some(spec) = forward_spec {\n                    port_forwards.push(parse_port_forward_spec(&spec)?);\n                } else {\n                    anyhow::bail!(\"Missing port forward format\");\n                }\n            }\n\n            for a in ALLOWED_ARGS {\n                if arg == *a {\n                    args.push(arg);\n                    if let Some(next) = tokens.next() {\n                        args.push(next);\n                    }\n                    continue 'outer;\n                } else if arg.starts_with(a) {\n                    args.push(arg);\n                    continue 'outer;\n                }\n            }\n            if arg.starts_with(\"-\") || hostname.is_some() {\n                anyhow::bail!(\"unsupported argument: {:?}\", arg);\n            }","sourceCodeStart":1686,"sourceCodeEnd":1722,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/remote/src/transport/ssh.rs#L1686-L1722","documentation":"Thrown while parsing an SSH command line when a `-L` option is given but no forwarding specification follows it (e.g. `-L` is the last token or its attached value is empty). The parser expected a `[bind_address:]port:host:hostport` spec to either follow `-L` as the next token or be glued to it; neither was present, so the port-forward list cannot be built and argument parsing aborts.","triggerScenarios":"Thrown at crates/remote/src/transport/ssh.rs:1704 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a value after -L, e.g. -L 8080:localhost:80","Remove the dangling -L flag from the SSH arguments"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}