Skip to content

Make it simpler in ExecutionDiagnosticEventListener.ResolverError to distinguish between server and client errors #7144

Open

Description

Product

Hot Chocolate

Is your feature request related to a problem?

I want to log all server errors as errors, and all client errors at a lower severity level. However, ExecutionDiagnosticEventListener.ResolverError gives me no robust way to distinguish between them.

I originally tried to base this on whether the IError passed to ResolverError contains an exception, but this does then not log errors like HC0018 "Cannot return null for non-nullable field" as errors. I can of course add this code to the check, but adding error codes as I randomly discover that something is not logged as an error is no way to go about this.

The solution you'd like

I'm open to various solutions, but it could be something as simple as a property IError.IsServerError or IError.IsClientError.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions