smallrye-graphql: UnauthorizedException is hidden behind DataFetcherException in Quarkus 1.6
We have @Mutation method annotated with @Authenticated and JWT configured in our Quarkus app.
In Quarkus 1.5 GraphQL response reported io.quarkus.security.UnauthorizedException if JWT token was missing in request.
After update to Quarkus 1.6 it is changed to io.smallrye.graphql.execution.datafetcher.DataFetcherException and error message is “Server Error” and there is not any indication for caller what is really wrong.
It makes GraphQL API harder to use I believe, error reporting should be clear in this case, this is definitely not a server error but caller’s problem, so he should know what is wrong to be able to call API correctly.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (11 by maintainers)
Commits related to this issue
- #334 - added test for SecurityException handling — committed to velias/smallrye-graphql by velias 4 years ago
- #334 - test for SecurityException handling uses it's subclass now to better reproduce my original case — committed to velias/smallrye-graphql by velias 4 years ago
- #334 - added test for SecurityException handling — committed to velias/smallrye-graphql by velias 4 years ago
- #334 - test for SecurityException handling uses it's subclass now to better reproduce my original case — committed to velias/smallrye-graphql by velias 4 years ago
- Merge pull request #346 from velias/master #334 - test for SecurityException handling — committed to smallrye/smallrye-graphql by phillip-kruger 4 years ago
- #334 - added test for SecurityException handling — committed to t1/smallrye-graphql by velias 4 years ago
- #334 - test for SecurityException handling uses it's subclass now to better reproduce my original case — committed to t1/smallrye-graphql by velias 4 years ago
- Do not wrap security exceptions in DataFetcherException. Fix #334 Signed-off-by:Phillip Kruger <phillip.kruger@gmail.com> — committed to t1/smallrye-graphql by phillip-kruger 4 years ago
OK let’s figure out why it changed and take it from there.