Skip to content

Commit

Permalink
Merge pull request #52 from nickrobinson/main
Browse files Browse the repository at this point in the history
Adding query in progress response code check to async polling logic
  • Loading branch information
kenkoooo authored Dec 22, 2024
2 parents 210cfb2 + 6e49174 commit 0858c24
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,9 @@ async fn poll_for_async_results(

let response: SnowflakeResponse =
serde_json::from_str(&body).map_err(|e| Error::Json(e, body))?;
if response.code.as_deref() != Some(QUERY_IN_PROGRESS_ASYNC_CODE) {
if response.code.as_deref() != Some(QUERY_IN_PROGRESS_ASYNC_CODE)
&& response.code.as_deref() != Some(QUERY_IN_PROGRESS_CODE)
{
return Ok(response);
}
}
Expand Down

0 comments on commit 0858c24

Please sign in to comment.