{"record":{"id":"2dfa557b35c2b7de","repo":"BloopAI/vibe-kanban","slug":"unsupported-url-scheme-http-url","errorCode":null,"errorMessage":"unsupported URL scheme: {http_url}","messagePattern":"unsupported URL scheme: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/relay-tunnel-core/src/lib.rs","lineNumber":28,"sourceCode":"///\n/// Increases the stream window size and write timeout over the defaults (256 KB / 10s)\n/// to handle large HTTP responses over slow connections without triggering write timeouts.\npub(crate) fn yamux_config() -> YamuxConfig {\n    YamuxConfig {\n        max_stream_window_size: 1024 * 1024, // 1 MB (default: 256 KB)\n        connection_write_timeout: Duration::from_secs(30), // (default: 10s)\n        ..Default::default()\n    }\n}\n\n/// Convert an HTTP(S) URL to its WebSocket equivalent (ws:// or wss://).\npub fn http_to_ws_url(http_url: &str) -> anyhow::Result<String> {\n    if let Some(rest) = http_url.strip_prefix(\"https://\") {\n        Ok(format!(\"wss://{rest}\"))\n    } else if let Some(rest) = http_url.strip_prefix(\"http://\") {\n        Ok(format!(\"ws://{rest}\"))\n    } else {\n        anyhow::bail!(\"unsupported URL scheme: {http_url}\")\n    }\n}\n","sourceCodeStart":10,"sourceCodeEnd":31,"githubUrl":"https://github.com/BloopAI/vibe-kanban/blob/4deb7eca8f381f7cbc1f9d15515a9ab8f8009053/crates/relay-tunnel-core/src/lib.rs#L10-L31","documentation":"http_to_ws_url converts an http:// or https:// base URL into its ws:// or wss:// WebSocket equivalent. Any URL without one of those two prefixes cannot be translated and is rejected, since the target scheme would be ambiguous.","triggerScenarios":"Calling http_to_ws_url with a URL missing a scheme (e.g. 'localhost:8080' or 'example.com'), or with a non-HTTP scheme like 'ftp://' or an already-ws URL.","commonSituations":"Config value for the relay server URL written without 'http://' prefix; user pasted a 'wss://' URL into an http-only setting; env var defaults lacking the scheme.","solutions":["Prefix the configured URL with 'http://' or 'https://' before calling","Validate the URL scheme at configuration load time","If the input may already be a ws URL, normalize/strip 'ws://' / 'wss://' first"],"exampleFix":"// before\nlet ws = http_to_ws_url(\"relay.example.com\")?; // bails\n// after\nlet ws = http_to_ws_url(\"https://relay.example.com\")?; // \"wss://relay.example.com\"","handlingStrategy":"validation","validationCode":"if !url.starts_with(\"http://\") && !url.starts_with(\"https://\") { panic!(\"relay server URL must start with http:// or https://\"); }","typeGuard":null,"tryCatchPattern":"let ws_url = http_to_ws_url(cfg.server_url).map_err(|e| ConfigError::InvalidServerUrl(e.to_string()))?;","preventionTips":["Validate configured URLs at startup, not at call time","Include scheme in example config/env var docs","Normalize inputs by auto-prefixing https:// when scheme missing"],"tags":["url","configuration","scheme"],"backgroundTag":"unsupported-url-scheme","analyzedSha":"4deb7eca8f381f7cbc1f9d15515a9ab8f8009053","analyzedAt":"2026-08-29T09:24:13.446Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}