Class GraphQLRequestExecutionException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.graphql_java_generator.exception.GraphQLRequestExecutionException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
GraphQLResponseParseException

public class GraphQLRequestExecutionException
extends java.lang.Exception
Thrown when an error occurs during the request execution. This is typically, when Bind Variable are missing while executing a request, or when an error occurs on server side. In the later case, the getErrors() method allows to retrieve the error data returned by the GraphQL server, including the source location, and extension.
Author:
etienne-sf
See Also:
Serialized Form
  • Constructor Summary

    Constructors 
    Constructor Description
    GraphQLRequestExecutionException​(java.lang.String msg)  
    GraphQLRequestExecutionException​(java.lang.String msg, java.lang.Throwable cause)  
    GraphQLRequestExecutionException​(java.lang.String msg, java.util.List<Error> errors)  
    GraphQLRequestExecutionException​(java.util.List<Error> errors)
    Generates a new instance, from a non empty and non null list of GraphQLError
  • Method Summary

    Modifier and Type Method Description
    java.util.List<Error> getErrors()
    Returns the list of the errors returned by the GraphQL server.

    Methods inherited from class java.lang.Throwable

    addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • getErrors

      public java.util.List<Error> getErrors()
      Returns the list of the errors returned by the GraphQL server.
      Returns:
      Each Error is an instance of GraphQLError, with additional utility method to retrieve the content of the extension field.