From 71f8f52b58da2ad76f56bf17c1f2dd06314a7bb1 Mon Sep 17 00:00:00 2001 From: asonix Date: Mon, 13 Nov 2023 17:24:50 -0600 Subject: [PATCH] Tweak error reporting --- src/error.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/error.rs b/src/error.rs index 0855d56..e16a4a2 100644 --- a/src/error.rs +++ b/src/error.rs @@ -45,7 +45,7 @@ impl std::fmt::Display for Error { impl std::error::Error for Error { fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { - self.inner.source() + Some(self.inner.as_ref()) } } @@ -53,6 +53,7 @@ impl From for Error where UploadError: From, { + #[track_caller] fn from(error: T) -> Self { let inner = Report::from(UploadError::from(error)); let debug = Arc::from(format!("{inner:?}"));