Skip to content
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

Exposing error in form of thiserror instead of anyhow #260

Closed
iamsiddhant05 opened this issue Mar 9, 2022 · 3 comments · Fixed by #268
Closed

Exposing error in form of thiserror instead of anyhow #260

iamsiddhant05 opened this issue Mar 9, 2022 · 3 comments · Fixed by #268
Assignees

Comments

@iamsiddhant05
Copy link

Is your feature request related to a problem? Please describe.
The error trait is not exposed in the library, which makes it difficult to unwrap and bubble up.

Describe alternatives you've considered
An alternate would be if you could expose a custom RustS3Error trait for error handling

@blackghost1987
Copy link

Yeah, this was a bit surprising for me! The anyhow crate explicitly states that it should be used for application code and libraries should use thiserror instead.
Also my upstream library is using thiserror as well, but because of this crate I had to import anyhow as well, just so I could encapsulate it with thiserror.

This looks like a good first contribution, I'll see if I'll have the time to work on a PR.

@nightmared
Copy link
Contributor

In the past, I already tried to add this to rust-s3: #166. Maybe this could serve as a useful basis if you desire to implement it and want to get it merged (something I failed to do, given that my PR was closed without explanations?).
In any case, I second the fact that this would be a very useful feature!

@nightmared
Copy link
Contributor

Sorry, wrong link, the most recent PR on the matter is #189.

@durch durch mentioned this issue Apr 21, 2022
@durch durch closed this as completed Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants