diff --git a/quickwit/quickwit-search/src/error.rs b/quickwit/quickwit-search/src/error.rs index 0dbdff10e41..6e2e511f30c 100644 --- a/quickwit/quickwit-search/src/error.rs +++ b/quickwit/quickwit-search/src/error.rs @@ -105,8 +105,13 @@ impl From for tonic::Status { /// Parse tonic error and returns `SearchError`. pub fn parse_grpc_error(grpc_error: &tonic::Status) -> SearchError { // TODO: the serialization to JSON part is missing. - serde_json::from_str(grpc_error.message()) - .unwrap_or_else(|_| SearchError::Internal(grpc_error.message().to_string())) + serde_json::from_str(grpc_error.message()).unwrap_or_else(|_| { + SearchError::Internal(format!( + "tonic error: {} ({})", + grpc_error.message(), + grpc_error.code() + )) + }) } impl From for SearchError {