Skip to content

More verbose error#55

Merged
vustef merged 8 commits intomainfrom
vs-more-verbose-error
Feb 19, 2026
Merged

More verbose error#55
vustef merged 8 commits intomainfrom
vs-more-verbose-error

Conversation

@vustef
Copy link
Copy Markdown
Collaborator

@vustef vustef commented Feb 19, 2026

In exception like:

Unexpected => Failed to load manifest list in cache, source: Unexpected => Failure in doing io operation, source: Unexpected (persistent) at read, context: { url: https://nsh-ibt.s3.us-east-1.amazonaws.com/customer_iceberg.5Et4fZvD/metadata/snap-5057205298355132429-1-92c679c0-2a3c-4fc5-9422-7c1736682697.avro, called: http_util::Client::send, service: s3, path: customer_iceberg.5Et4fZvD/metadata/snap-5057205298355132429-1-92c679c0-2a3c-4fc5-9422-7c1736682697.avro, range: 0- } => send http request, source: error sending request for url (https://nsh-ibt.s3.us-east-1.amazonaws.com/customer_iceberg.5Et4fZvD/metadata/snap-5057205298355132429-1-92c679c0-2a3c-4fc5-9422-7c1736682697.avro)

root cause is being swallowed. The error ends at error sending request for url (...) without saying why (DNS failure? TLS error? timeout? connection refused?).

The iceberg Display implementation recurses through sources:

// error.rs:167
if let Some(source) = &self.source {
write!(f, ", source: {source}")?; // {source} = anyhow Display = inner error's Display
}

This works for iceberg and opendal errors because they both include source: in their Display. But at the bottom of the chain, reqwest::Error::Display only shows "error sending request for url (...)" - it does not include its own .source() (which would be the actual hyper/DNS/TLS error).

The chain stops because reqwest::Error follows the standard Rust convention where Display only shows the current error, not the source.

Now for the original error, the output would look something like:

Unexpected => Failure in doing io operation (hidden sources: hyper::Error(...): dns error: failed to lookup address information: Name or service not  known), source: Unexpected (persistent) at read, context: { ... } => send http request, source: error sending request for url (...)

The (hidden sources: ...) part surfaces the details that reqwest's Display was hiding, while the structured source: chain remains unchanged.

@vustef vustef requested a review from gbrgr February 19, 2026 12:20
Copy link
Copy Markdown
Collaborator

@gbrgr gbrgr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@vustef vustef requested a review from gbrgr February 19, 2026 12:36
@vustef vustef merged commit 3babfb6 into main Feb 19, 2026
13 checks passed
@vustef vustef deleted the vs-more-verbose-error branch February 19, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants