Skip to content
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
@gschei

Description

@gschei

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions