Class GraphQLRequestExecutionException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.graphql_java_generator.exception.GraphQLRequestExecutionException
All Implemented Interfaces:
GraphQLRequestExecutionExceptionInterface, Serializable

public class GraphQLRequestExecutionException extends Exception implements GraphQLRequestExecutionExceptionInterface
Thrown when an error occurs during the request execution. This is typically when :
  • One or more Bind Variable are missing
  • When an error occurred on server side. In this case (and only in this case), the getErrors() method returns non null value. This value is the server errors list.
Author:
etienne-sf
See Also:
  • Constructor Details

    • GraphQLRequestExecutionException

      public GraphQLRequestExecutionException(String msg)
    • GraphQLRequestExecutionException

      public GraphQLRequestExecutionException(String msg, Throwable cause)
    • GraphQLRequestExecutionException

      public GraphQLRequestExecutionException(List<org.springframework.graphql.ResponseError> errors, Object data, org.springframework.graphql.client.ClientGraphQlResponse response)
      Generates a new instance, from a non empty and non null list of GraphQLError
      Parameters:
      errors - A list of GraphQL error messages
      data - the data returned by the server, parsed by the plugin into the generated POJO that match the GraphQL schema. For instance, when executing a full query that requests to query's field, it can for instance contain the valid response data for one, while there is an error for the second queried field.
  • Method Details