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

Uncaught @Async invocations should use BeanExceptionHandler #2346

Open
lightbody opened this issue Nov 15, 2019 · 2 comments
Open

Uncaught @Async invocations should use BeanExceptionHandler #2346

lightbody opened this issue Nov 15, 2019 · 2 comments
Labels
status: under consideration The issue is being considered, but has not been accepted yet type: improvement A minor improvement to an existing feature

Comments

@lightbody
Copy link
Contributor

This is a feature / enhancement request.

The docs indicate that TaskExceptionHandler can be used to handle uncaught exceptions caused by scheduled tasks, such as methods annotated with @Scheduled. But because @Async can use the same executors, it seems reasonable that those method invocations should also defer exception handling to either TaskExceptionHandler or at least another type of BeanExceptionHandler. Right now AsyncInterceptor catches invocations and simply logs them directly.

Thanks for considering!

@jameskleeh jameskleeh added type: improvement A minor improvement to an existing feature status: under consideration The issue is being considered, but has not been accepted yet labels Nov 15, 2019
@pgrosslicht
Copy link

Hi, has this been considered since then? We just ran into this issue as well, we have a custom TaskExceptionHandler to report errors to Sentry and because of this issue errors in @Async methods don't get reported.

@paulolieuthier
Copy link

Same here, I was surprised to see there was no error handling for @Async.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: under consideration The issue is being considered, but has not been accepted yet type: improvement A minor improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

4 participants