You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by xu...@apache.org on 2024/12/13 10:16:13 UTC
(iceberg-rust) branch error-debug updated: Don't hide internal source error
This is an automated email from the ASF dual-hosted git repository.
xuanwo pushed a commit to branch error-debug
in repository https://gitbox.apache.org/repos/asf/iceberg-rust.git
The following commit(s) were added to refs/heads/error-debug by this push:
new 40c69886 Don't hide internal source error
40c69886 is described below
commit 40c698864e1900b95f0c7b09764fc766ec82fab3
Author: Xuanwo <gi...@xuanwo.io>
AuthorDate: Fri Dec 13 18:15:58 2024 +0800
Don't hide internal source error
Signed-off-by: Xuanwo <gi...@xuanwo.io>
---
crates/iceberg/src/io/object_cache.rs | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/crates/iceberg/src/io/object_cache.rs b/crates/iceberg/src/io/object_cache.rs
index 88e2d0e2..ede637d3 100644
--- a/crates/iceberg/src/io/object_cache.rs
+++ b/crates/iceberg/src/io/object_cache.rs
@@ -141,7 +141,15 @@ impl ObjectCache {
.entry_by_ref(&key)
.or_try_insert_with(self.fetch_and_parse_manifest_list(snapshot, table_metadata))
.await
- .map_err(|err| Error::new(ErrorKind::Unexpected, err.as_ref().message()))?
+ .map_err(|err| {
+ Arc::try_unwrap(err).unwrap_or_else(|err| {
+ Error::new(
+ ErrorKind::Unexpected,
+ "Failed to load manifest list in cache",
+ )
+ .with_source(err)
+ })
+ })?
.into_value();
match cache_entry {