Skip to content
This repository was archived by the owner on Feb 18, 2025. It is now read-only.

Commit 1d9a68d

Browse files
ktiaysunixzii
authored andcommitted
Fix issue unexpected exit when auth polling
1 parent c9b5bf2 commit 1d9a68d

File tree

1 file changed

+7
-3
lines changed
  • crates/cursor-core/src/auth

1 file changed

+7
-3
lines changed

crates/cursor-core/src/auth/mod.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,15 @@ async fn polling(
145145
HttpMethod::Get,
146146
)
147147
.send()
148-
.await else {
149-
// If the request fails, it means that the server is not ready yet,
150-
// so we need to continue polling.
148+
.await
149+
else {
151150
continue;
152151
};
152+
if response.status_code() != 200 {
153+
// If the request fails, it means that the server is not ready yet,
154+
// so we need to continue polling.
155+
continue;
156+
}
153157
let data = response.text().await;
154158

155159
#[cfg(debug_assertions)]

0 commit comments

Comments
 (0)