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

Add anyhow::Error example #342

Merged
merged 2 commits into from
Feb 7, 2025
Merged

Add anyhow::Error example #342

merged 2 commits into from
Feb 7, 2025

Conversation

TmLev
Copy link
Contributor

@TmLev TmLev commented Feb 3, 2025

Made a simple example showing how to integrate anyhow::Error with rspc's typed error handling.

An unfortunate quirk: anyhow::Error cannot be easily converted into std::error::Error + Send + 'static. dtolnay suggests using thiserror to create a transparent wrapper.

Resolves #215.

cc @oscartbeaumont

Copy link

vercel bot commented Feb 3, 2025

@TmLev is attempting to deploy a commit to the Oscar Beaumont Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Member

@oscartbeaumont oscartbeaumont left a comment

Choose a reason for hiding this comment

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

Thank you!

@oscartbeaumont oscartbeaumont merged commit 06afc25 into specta-rs:main Feb 7, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Example of using anyhow
3 participants