diff --git a/src/client/src/error.rs b/src/client/src/error.rs index 508740e519..bb68dad64e 100644 --- a/src/client/src/error.rs +++ b/src/client/src/error.rs @@ -116,7 +116,8 @@ impl From for Error { }) .unwrap_or(StatusCode::Unknown); - let msg = get_metadata_value(&e, GREPTIME_ERROR_MSG).unwrap_or(e.to_string()); + let msg = + get_metadata_value(&e, GREPTIME_ERROR_MSG).unwrap_or_else(|| e.message().to_string()); Self::Server { code, msg } }