This repository was archived by the owner on Dec 19, 2023. It is now read-only.
This repository was archived by the owner on Dec 19, 2023. It is now read-only.
Support NullPointerException in ErrorHandler #896
Open
Description
Currently if a resolver throws a NullPointerException it cannot be handled by the ErrorHandler, because GraphqlErrorBuilder has a assertNotNull on the message and NullPointerException does not return a Message.
Assert.assertNotNull(this.message, () -> {
return "You must provide error message";
});
I would suggest to enhance the GraphQLErrorFromExceptionHandler to set the Message alternatively with eg. the className. Then a NullPointerException would be handled gracefully and remaining data would be returned.