From 329246852010471eb93eea8241008cc32c910889 Mon Sep 17 00:00:00 2001 From: Sarah Shader Date: Wed, 20 Mar 2024 19:16:21 -0400 Subject: [PATCH] Revert added context on funrun errors (#23734) This seems to overwrite the existing message, which isn't what we want. Reverting for now. GitOrigin-RevId: 9b9963f2bfc1c53e9100369f0cda7983b44d3b64 --- crates/pb/src/error_metadata.rs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/crates/pb/src/error_metadata.rs b/crates/pb/src/error_metadata.rs index 0cd97212..37cca4c2 100644 --- a/crates/pb/src/error_metadata.rs +++ b/crates/pb/src/error_metadata.rs @@ -1,5 +1,3 @@ -use std::fmt::Display; - use anyhow::Context; use errors::{ ErrorCode, @@ -81,9 +79,6 @@ impl TryFrom for ErrorMetadata { pub trait ErrorMetadataStatusExt { fn from_anyhow(error: anyhow::Error) -> Self; fn into_anyhow(self) -> anyhow::Error; - fn context(self, context: C) -> Self - where - C: Display + Send + Sync + 'static; } impl ErrorMetadataStatusExt for tonic::Status { @@ -117,14 +112,6 @@ impl ErrorMetadataStatusExt for tonic::Status { } error } - - fn context(self, context: C) -> Self - where - C: Display + Send + Sync + 'static, - { - let anyhow_err = self.into_anyhow(); - Self::from_anyhow(anyhow_err.context(context)) - } } #[cfg(test)]