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

feat: implement StdErr for poem::Error #868

Merged
merged 2 commits into from
Sep 8, 2024
Merged

Conversation

cpubot
Copy link
Contributor

@cpubot cpubot commented Aug 18, 2024

Implements std::error::Error for poem::Error.

This is useful for error reporting cases where, for example, it's advantageous to be able to traverse the stack of error sources for more detailed error reporting. An example of a such a case is the sentry crate's event_from_error function. Without this implementation, user's must explicitly capture every error instance in their application and forward to reporting services before wrapping them in a poem::Error, which precludes implementing a global error handler in a poem middleware (which only have access to poem::Error), for example.

@sunli829 sunli829 merged commit 3887d07 into poem-web:master Sep 8, 2024
1 of 7 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