SubscriptionExceptionResolver.resolveException
should accept DataFetchingEnvironment
#1087
Labels
status: waiting-for-triage
An issue we've not yet triaged
Currently the method in
DataFetcherExceptionResolver
isMono<List<GraphQLError>> resolveException(Throwable exception, DataFetchingEnvironment environment)
while the method inSubscriptionExceptionResolver
isMono<List<GraphQLError>> resolveException(Throwable exception)
. It would be nice to haveDataFetchingEnvironment
passed in as well to include more information in our error logs.As a side note in
DataFetcherExceptionResolver.resolveException
I've noticed that for some reasonSecurityContextHolder.getContext().getAuthentication()
returns an instance ofAnonymousAuthentication
when I know the user is authenticated (and the same piece of code works correctly elsewhere) and as a work-around I'm force to useenvironment.getGraphQlContext().get<SecurityContextImpl>(SecurityContext::class.name).getAuthentication()
to get the proper authentication instance. Same applies inSubscriptionExceptionResolver
The text was updated successfully, but these errors were encountered: