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

AutomaticRetryAttribute opposite of OnlyOn #2372

Open
filippetrovic opened this issue Feb 26, 2024 · 0 comments
Open

AutomaticRetryAttribute opposite of OnlyOn #2372

filippetrovic opened this issue Feb 26, 2024 · 0 comments

Comments

@filippetrovic
Copy link

Hello,

I'm looking for the opposite behavior of the AutomaticRetryAttribute.OnlyOn - Retry on all exceptions except the specified ones.

Is there an elegant way to achieve this? At the moment, I've kinda solved it with IServerExceptionFilter by setting filterContext.ExceptionHandled = true when the desired exception is detected. But this has a flaw: jobs are marked as successful, not failed.

If I get guidance, I can spend time on this and raise a PR. Maybe introduce ExceptOn in AutomaticRetryAttribute that would be used together with OnlyOn to determine whether retry should happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant