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

Batch: CompletionException can not be unpacked #590

Closed
t1 opened this issue Jan 12, 2021 · 5 comments · Fixed by #619
Closed

Batch: CompletionException can not be unpacked #590

t1 opened this issue Jan 12, 2021 · 5 comments · Fixed by #619
Assignees
Labels
bug Something isn't working Server This issue applies to the Server side
Milestone

Comments

@t1
Copy link
Collaborator

t1 commented Jan 12, 2021

I have a batch resolver that throws an exception. The response then contains for every entry the same error (which is okay), but it's only a java.util.concurrent.CompletionException with error code completion, but I need access to the exception that caused the failure. It doesn't help to add the CompletionException to the smallrye.graphql.unwrapExceptions config.

@t1 t1 added bug Something isn't working Server This issue applies to the Server side labels Jan 12, 2021
@phillip-kruger
Copy link
Member

Are you fixing this ?

@phillip-kruger
Copy link
Member

@t1 - do you have a reproducer, I want to look at fixing this

@t1
Copy link
Collaborator Author

t1 commented Jan 21, 2021

I have it only nested in our application, but it would be something like this:

public List<Location> location(@Source List<SuperHero> heroes) {
    throw new RuntimeException();
}

I think unwrapping the CompletionException should be okay for everybody: I can't think of any use case for seeing this technical detail. If someone objects, using the smallrye.graphql.unwrapException would be a fallback.

@phillip-kruger
Copy link
Member

@t1 - Thanks, yes we do unwrap when not batch, so this is a batch specific issue. I'll have a look
Thanks :)

@phillip-kruger phillip-kruger added this to the 1.0.21 milestone Jan 21, 2021
@phillip-kruger
Copy link
Member

@t1 - I am battling to fix this. Have tried multiple approaches, but get stuck .... need to think about this a bit more....I am moving this to 1.0.22 (I need to do a release, and I am not going to be in time to get this in).

If you have any ideas, please let me know...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Server This issue applies to the Server side
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants