From 1c6dccac9365782e7dc2cadd976cbacfcd5e0292 Mon Sep 17 00:00:00 2001 From: TCeason Date: Wed, 30 Oct 2024 11:01:10 +0800 Subject: [PATCH] chore: if get version return databend_driver::Error::Api with request url, should return err --- cli/src/session.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cli/src/session.rs b/cli/src/session.rs index bc4e92eb..247f9534 100644 --- a/cli/src/session.rs +++ b/cli/src/session.rs @@ -119,7 +119,14 @@ impl Session { return Err(err.into()); } } - _ => 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()); + } + } + _ => {} } "".to_string() }