Skip to content

feat: bubble up the entire reqwest error #175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 13, 2025

Conversation

gruuya
Copy link
Contributor

@gruuya gruuya commented May 13, 2025

This PR changes the conversion of the reqwest error, that may occur in the iceberg-rest-catalog crate, from InvalidFormat to External variant.

Besides the fact that External seems a more appropriate choice semantically, there's also the matter of obfuscating relevant information buried in the error. The present "downcasting" the reqwest error into a string wrapped up by InvalidFormat results in error messages like error sending request for url (https://lakekeeper-ssl.dev/catalog/v1/568203c4-2034-11f0-894d-bb6b55e6f56f/namespaces) doesn't have the right format. This is not informative enough, but it also does not allow users of this crate to further troubleshoot the error as only its string representation remains.

In contrast, if wrapped by External, one could use a recipe like seanmonstar/reqwest#2342 (reply in thread), in order to unravel more information and present it to the user.

@JanKaul
Copy link
Owner

JanKaul commented May 13, 2025

Makes a lot of sense. Thank you!

@JanKaul JanKaul merged commit fbb5f62 into JanKaul:main May 13, 2025
2 checks passed
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