From 12c330572b72e07514aff27327658b9f3d433cd1 Mon Sep 17 00:00:00 2001 From: Runji Wang Date: Fri, 29 Dec 2023 17:32:02 +0800 Subject: [PATCH] fix error msg Signed-off-by: Runji Wang --- src/frontend/src/handler/create_function.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/handler/create_function.rs b/src/frontend/src/handler/create_function.rs index fdbdeeee5c9ae..3c8300d3e979a 100644 --- a/src/frontend/src/handler/create_function.rs +++ b/src/frontend/src/handler/create_function.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use anyhow::Context; +use anyhow::{anyhow, Context}; use arrow_schema::Fields; use bytes::Bytes; use itertools::Itertools; @@ -145,7 +145,7 @@ pub async fn handle_create_function( { let client = ArrowFlightUdfClient::connect(&link) .await - .context("failed to connect UDF server")?; + .map_err(|e| anyhow!(e))?; /// A helper function to create a unnamed field from data type. fn to_field(data_type: arrow_schema::DataType) -> arrow_schema::Field { arrow_schema::Field::new("", data_type, true)