{"record":{"id":"c90fa1365e5d51a7","repo":"warpdotdev/warp","slug":"error-polling-oauth-status-err-c90fa1","errorCode":null,"errorMessage":"Error polling OAuth status: {err}","messagePattern":"Error polling OAuth status: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"app/src/ai/agent_sdk/integration.rs","lineNumber":328,"sourceCode":"                                            }\n                                            Ok(OauthConnectTxStatus::Expired) => {\n                                                ctx.terminate_app(\n                                                    TerminationMode::ForceTerminate,\n                                                    Some(Err(anyhow::anyhow!(\"OAuth authorization expired.\"))),\n                                                );\n                                            }\n                                            Ok(OauthConnectTxStatus::Pending)\n                                            | Ok(OauthConnectTxStatus::InProgress) => {\n                                                // Should not be returned by poll_oauth_until_terminal.\n                                                ctx.terminate_app(\n                                                    TerminationMode::ForceTerminate,\n                                                    Some(Err(anyhow::anyhow!(\"Unexpected non-terminal OAuth status returned\"))),\n                                                );\n                                            }\n                                            Err(err) => {\n                                                ctx.terminate_app(\n                                                    TerminationMode::ForceTerminate,\n                                                    Some(Err(anyhow::anyhow!(\"Error polling OAuth status: {err}\"))),\n                                                );\n                                            }\n                                        }\n                                    },\n                                );\n                            }\n                            (Some(auth_url), None) => {\n                                println!(\"Authorize the provider here: {auth_url}\\n\");\n                                ctx.open_url(&auth_url);\n                                println!(\n                                    \"After authorizing, re-run the command to continue the integration {action} process.\",\n                                );\n                                ctx.terminate_app(\n                                    TerminationMode::ForceTerminate,\n                                    None,\n                                );\n                            }\n                            (None, Some(_)) => {","sourceCodeStart":310,"sourceCodeEnd":346,"githubUrl":"https://github.com/warpdotdev/warp/blob/e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc/app/src/ai/agent_sdk/integration.rs#L310-L346","documentation":"Wrapper around the underlying error returned by `poll_oauth_until_terminal` while polling the OAuth transaction after an integration create/update returned (auth_url, tx_id). The {err} suffix carries the real cause — network failure, HTTP/GraphQL error from the integrations client, or an auth problem — and the app force-terminates with it.","triggerScenarios":"During `integration create/update`, after the browser is opened for authorization, the polling future returns Err: connection reset or timeout mid-poll, 401/403 from the integrations client, a GraphQL transport failure, or the server dropping the transaction.","commonSituations":"Offline or proxied environments that cut long polling requests; login credentials expiring mid-flow; a self-hosted warp-server restarting and losing the transaction; VPN/DNS flakiness while the poll loop runs.","solutions":["Read the {err} text — it names the actual transport or auth cause.","Verify connectivity to SERVER_ROOT_URL (e.g. curl) and re-run the command; OAuth state is server-side and the flow restarts cleanly.","If err mentions 401/403 or auth, re-run login then retry the integration command.","For self-hosted warp-server, check its logs and whether the transaction expired server-side."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Before starting the flow, cheap reachability check:\nlet client = ServerApiProvider::as_ref(ctx).get_integrations_client();\nif let Err(e) = client.ping().await {\n    eprintln!(\"server unreachable, aborting before OAuth flow: {e}\");\n    return;\n}","typeGuard":null,"tryCatchPattern":"Match the poll Result; for Err messages indicating transport failure (timeout, connection reset), re-spawn poll_oauth_until_terminal with bounded retry/backoff instead of terminate_app; terminate only on auth errors or exhausted retries.","preventionTips":["Stabilize network/proxy settings before starting OAuth flows — the poll loop runs for the whole authorization window.","Re-verify login with whoami before long-running integration commands.","Wrap polling in a retry-with-backoff helper so single transient failures do not kill the CLI."],"tags":["oauth","network","integration","agent-sdk","rust"],"backgroundTag":null,"analyzedSha":"e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc","analyzedAt":"2026-08-16T08:27:25.381Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}