Skip to content

Custom ExceptionMiddleware not catching exceptions #5510

Answered by michaelstaib
mshann03 asked this question in Q&A
Discussion options

You must be logged in to vote

Resolver error are not propagated to the request middleware...

The request pipeline represents a modular pipeline for the request level execution steps.

The field middleware represents this for the GraphQL field. In your case you are throwing an exception in the resolver so you need to use a filed middleware.

In any case, if you just want to catch and log resolver level errors / exception use the diagnostic events an override ResolverError.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by mshann03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants