dgs-framework icon indicating copy to clipboard operation
dgs-framework copied to clipboard

bug: Exceptions thrown in DgsReactiveCustomContextBuilderWithRequest are not being handled

Open IvBre opened this issue 3 years ago • 0 comments

Hi, first time asking a question here, just wanted to say thank you for sharing this awesome library with the world!

What I noticed is that exceptions thrown in my custom DgsReactiveCustomContextBuilderWithRequest are not being caught by the GraphQL exception handler, so the error just gets printed in plain text on the page with HTTP status 400. If the same exception is being thrown inside of the data fetcher then it works fine.

Expected behavior

Exceptions thrown in the DgsReactiveCustomContextBuilderWithRequest are handled the same way as other GraphQL errors.

Actual behavior

Exceptions thrown in the DgsReactiveCustomContextBuilderWithRequest are not handled by the standard GraphQL exception handler but printed in plain text with status 400.

Steps to reproduce

Create a component that extends DgsReactiveCustomContextBuilderWithRequest and throw an exception in fun build().

IvBre avatar Mar 02 '22 09:03 IvBre