Skip to content

Commit

Permalink
commit_graph: log lower level causes when logging to scuba
Browse files Browse the repository at this point in the history
Summary: Calling `.to_string()` on `anyhow::Error` uses the `Display` trait which only displays the outermost error. Use `{:#}` instead to display the lower level causes as well.

Reviewed By: lmvasquezg

Differential Revision: D65816416

fbshipit-source-id: c149d1453376944fe99f664aac2fe4ad7574af26
  • Loading branch information
YousefSalama authored and facebook-github-bot committed Nov 12, 2024
1 parent 8b28606 commit 4eb2837
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ impl CommitGraphWriter for LoggingCommitGraphWriter {

match self.inner_writer.add(ctx, cs_id, parents).try_timed().await {
Err(err) => {
scuba.add("error", err.to_string());
scuba.add("error", format!("{:#}", err));
scuba.log_with_msg("Insertion failed", None);

Err(err)
Expand Down

0 comments on commit 4eb2837

Please sign in to comment.