Skip to content

Commit

Permalink
fix(core): should call handle_session() when query fail. (#359)
Browse files Browse the repository at this point in the history
  • Loading branch information
youngsofun authored Mar 8, 2024
1 parent 4c3041b commit 9290c2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,10 +323,10 @@ impl APIClient {
}

let resp: QueryResponse = resp.json().await?;
self.handle_session(&resp.session).await;
if let Some(err) = resp.error {
return Err(Error::InvalidResponse(err));
}
self.handle_session(&resp.session).await;
self.handle_warnings(&resp);
Ok(resp)
}
Expand Down

0 comments on commit 9290c2a

Please sign in to comment.