Skip to content

Commit

Permalink
feat: show root error for grpc
Browse files Browse the repository at this point in the history
  • Loading branch information
sunng87 committed Jul 27, 2024
1 parent 7bc97d7 commit 07650a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/servers/src/grpc/greptime_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ impl GreptimeRequestHandler {
.await
.map_err(|e| {
if e.status_code().should_log_error() {
error!(e; "Failed to handle request");
let root_error = e.root_cause().unwrap_or(&e);
error!(e; "Failed to handle request, error: {}", root_error.to_string());
} else {
// Currently, we still print a debug log.
debug!("Failed to handle request, err: {:?}", e);
Expand Down

0 comments on commit 07650a3

Please sign in to comment.