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 support for inspecting exception causes in @Retry #1794

Open
leonard84 opened this issue Sep 19, 2023 · 0 comments
Open

Add support for inspecting exception causes in @Retry #1794

leonard84 opened this issue Sep 19, 2023 · 0 comments

Comments

@leonard84
Copy link
Member

Is your feature request related to a problem?

Sometimes the exception that you want to actually want to look at is the cause of the top-level exception. For example if the exception happened in a condition you get a ConditionFailedWithExceptionError which is fairly unspecific.

Describe the solution you'd like

Either always expect causes, or add a flag to inspect them when configured.

@Retry (
    exceptions = StaleElementReferenceException,
    inspectCauses = true
)

Describe alternatives you've considered

@Retry (
    exceptions = [StaleElementReferenceException, ConditionFailedWithExceptionError],
    // exceptions don't check causes, so we need to do it in the condition
    condition = {
        failure instanceof StaleElementReferenceException || failure.cause instanceof StaleElementReferenceException
    }
)

Additional context

No response

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

No branches or pull requests

1 participant