{"record":{"id":"9cdf392eefa87d38","repo":"Kuberwastaken/claurst","slug":"bridge-session-registration-failed-server-returne","errorCode":null,"errorMessage":"Bridge session registration failed: server returned HTTP {}. {}","messagePattern":"Bridge session registration failed: server returned HTTP (.+?)\\. (.+?)","errorType":"http","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src-rust/crates/bridge/src/lib.rs","lineNumber":1015,"sourceCode":"            anyhow::bail!(\r\n                \"Bridge session registration failed: authentication error (HTTP {}).\\n\\\r\n                 Your token may be invalid or expired.\\n\\\r\n                 Get a new token from https://claude.ai (Settings → Remote Control).\",\r\n                status\r\n            );\r\n        }\r\n        404 => {\r\n            // The /api/bridge/sessions endpoint may not exist in all deployments.\r\n            // Fall through to synthetic session URL (best-effort mode).\r\n            warn!(\r\n                session_id = %session_id,\r\n                \"Bridge registration endpoint not found (HTTP 404) — \\\r\n                 using local session ID without server validation\"\r\n            );\r\n        }\r\n        _ => {\r\n            let body_text = resp.text().await.unwrap_or_default();\r\n            anyhow::bail!(\r\n                \"Bridge session registration failed: server returned HTTP {}. {}\",\r\n                status,\r\n                if body_text.is_empty() { String::new() } else { format!(\"Response: {}\", &body_text[..body_text.len().min(200)]) }\r\n            );\r\n        }\r\n    }\r\n\r\n    // Build the shareable session URL.\r\n    let session_url = format!(\"{}/code/sessions/{}\", server_url, session_id);\r\n\r\n    Ok(BridgeSessionInfo {\r\n        session_id,\r\n        session_url,\r\n        token,\r\n    })\r\n}\r\n\r\n/// Poll for incoming messages on an active bridge session.\r","sourceCodeStart":997,"sourceCodeEnd":1033,"githubUrl":"https://github.com/Kuberwastaken/claurst/blob/b0637c97ec34144387cbf2f74f65df6d16a6cef1/src-rust/crates/bridge/src/lib.rs#L997-L1033","documentation":"Thrown when the bridge session registration endpoint replies with any status other than 200 and 401/404 (which are handled separately). Indicates the server rejected the POST /api/bridge/sessions call for an unclassified reason — e.g. 5xx outage, 400 bad request, or a proxy error — and registration could not complete.","triggerScenarios":"Thrown at src-rust/crates/bridge/src/lib.rs:1015 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the bridge service status and retry; transient 5xx responses usually resolve on their own","Inspect the response body/logs for the exact status code to classify the failure","If the deployment does not support the sessions endpoint (404 path), rely on the synthetic session URL best-effort mode instead"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b0637c97ec34144387cbf2f74f65df6d16a6cef1","analyzedAt":"2026-09-10T00:24:58.650Z","contentChangedAt":"2026-09-10T00:24:58.650Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}