-
Couldn't load subscription status.
- Fork 174
Description
Description
Hi,
I'm not quite sure if it's a bug, but I found a strange behavior after updating to version 6.1.0.
Since this version checked exceptions thrown in field resolver functions are getting wrapped by an UndeclaredThrowableException.
The corresponding change came with this commit: 950e291
Is there any particular reason for this implementation?
According to Oracle's documentation such an exception should only be thrown if a method throws a checked exception in its body that is not declared in the method's signature.
Expected behavior
Checked exceptions are not getting wrapped by an UndeclaredThrowableException, but only thrown as RuntimeExceptions and Errors.
Actual behavior
Checked exceptions are are getting wrapped by an UndeclaredThrowableException.
Steps to reproduce the bug
- Define a query in the GQL scheme
type Query { testQuery: String }- Implement a corresponding resolver function and throw a checked Exception
public String testQuery() throws Exception { throw new Exception(); }