Skip to content

Commit

Permalink
chore: if return databend-query err should exit client (#502)
Browse files Browse the repository at this point in the history
* debug

* chore: if get version return databend_driver::Error::Api with request url, should return err
  • Loading branch information
TCeason authored Oct 30, 2024
1 parent b6f550d commit d1a1d29
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion cli/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,16 @@ impl Session {
databend_driver::Error::Arrow(arrow::error::ArrowError::IpcError(
ref ipc_err,
)) => {
if ipc_err.contains("Unauthenticated") {
if ipc_err.contains("Unauthenticated")
|| ipc_err.contains("Connection refused")
{
return Err(err.into());
}
}
databend_driver::Error::Api(databend_client::error::Error::Request(
ref resp_err,
)) => {
if resp_err.contains("error sending request for url") {
return Err(err.into());
}
}
Expand Down

0 comments on commit d1a1d29

Please sign in to comment.