{"record":{"id":"e48c097682683a19","repo":"zed-industries/zed","slug":"oauth-callback-server-was-cancelled-by-another-sig","errorCode":null,"errorMessage":"OAuth callback server was cancelled by another sign-in attempt","messagePattern":"OAuth callback server was cancelled by another sign-in attempt","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/oauth_callback_server/src/oauth_callback_server.rs","lineNumber":298,"sourceCode":"                };\n\n                let raw_url = request.url().to_string();\n                let raw_path = raw_url.split('?').next().unwrap_or(&raw_url);\n                if raw_path == CANCEL_PATH {\n                    let response = tiny_http::Response::from_string(\"Cancelled\")\n                        .with_status_code(200)\n                        .with_header(\n                            tiny_http::Header::from_str(\"Content-Type: text/plain\")\n                                .expect(\"failed to construct response header\"),\n                        )\n                        .with_header(\n                            tiny_http::Header::from_str(\"Connection: close\")\n                                .expect(\"failed to construct response header\"),\n                        );\n                    if let Err(err) = request.respond(response) {\n                        log::error!(\"Failed to send OAuth cancel response: {}\", err);\n                    }\n                    let _ = tx.send(Err(anyhow!(\n                        \"OAuth callback server was cancelled by another sign-in attempt\"\n                    )));\n                    return;\n                }\n\n                let result = handle_oauth_callback_request(&request, expected_path);\n\n                let (status_code, body) = match &result {\n                    Ok(_) => (\n                        200,\n                        oauth_callback_page(\n                            \"Authorization Successful\",\n                            \"You can close this tab and return to Zed.\",\n                            false,\n                        ),\n                    ),\n                    Err(err) => {\n                        log::error!(\"OAuth callback error: {}\", err);","sourceCodeStart":280,"sourceCodeEnd":316,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/oauth_callback_server/src/oauth_callback_server.rs#L280-L316","documentation":"Supersession signal in the callback server loop: a request hit the /cancel path, meaning a newer sign-in attempt evicted this server; the pending receiver is resolved with this error so the stale attempt fails cleanly rather than hanging until timeout.","triggerScenarios":"Thrown at crates/oauth_callback_server/src/oauth_callback_server.rs:298 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ignore the stale attempt and complete the newest sign-in flow","If no new sign-in started, restart the OAuth flow"],"exampleFix":null,"handlingStrategy":"retry","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"}