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

FallbackHandler seems to not taken into consideration #2344

Closed
lordofthejars opened this issue May 6, 2019 · 0 comments · Fixed by #2358
Closed

FallbackHandler seems to not taken into consideration #2344

lordofthejars opened this issue May 6, 2019 · 0 comments · Fixed by #2358
Assignees
Labels
area/smallrye kind/bug Something isn't working
Milestone

Comments

@lordofthejars
Copy link
Contributor

lordofthejars commented May 6, 2019

I have created an example of fault tolerance using @Fallback annotation with the class approach:

public class RecoverFallback implements FallbackHandler<String> {
    @Override
    public String handle(ExecutionContext context) {
        return "It could be worse";
    }
}
    @GET
    @Produces(MediaType.TEXT_PLAIN)
    @Retry(maxRetries = 1)
    @Fallback(RecoverFallback.class)
    public String faultTolerance() {
        maybeFail();
        return "Hurrah";
    }

But the fallback is never executed. Doing the same but with fallbackMethod property then it works as expected.

@mkouba mkouba self-assigned this May 7, 2019
@mkouba mkouba added kind/bug Something isn't working area/smallrye labels May 7, 2019
@mkouba mkouba added this to the 0.15.0 milestone May 7, 2019
mkouba added a commit to mkouba/quarkus that referenced this issue May 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/smallrye kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants