-
Notifications
You must be signed in to change notification settings - Fork 15
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
[autoendpoint] Add sentry support to web handlers #155
Comments
Yeah, the sentry middleware is definitely a hack. The original actix author felt that errors should not progress into the middleware and should be handled by the functions. I don't know if that issue will be re-opened now that the project is under different management. |
actix-web middleware is just not super friendly to use as of actix-web 1.0. They require some extra boilerplate to use (the With all these drawbacks + the strange error handling, I generally don't recommend using actix-web middlewares at all unless there's a very compelling reason and or it's for something very simple. |
Using extractors ( |
|
This issue is now deprioritized, but here are some learnings:
|
Bumped to 5 due to sentry not working with Actix 1.0/2.0. We need to make our own middleware. |
* Update sentry to 0.19 * Override status_code() in ApiError's ResponseError impl * Use the default Sentry transport and work around a Sentry issue Working around this issue by using the `debug-logs` feature: getsentry/sentry-rust#237 * Add custom Sentry middleware Closes #155
Top-level panics are caught by sentry already, but panics and other errors in Actix handlers are caught at the worker level by Actix instead of sentry.
Some possible solutions:
It's not clear if this library will catch errors thrown by other middleware, but perhaps this isn't important if we don't use other middleware.
Already in use by syncstorage, handles errors thrown by other middleware, but is kind of a hack.
The text was updated successfully, but these errors were encountered: