Class 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      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 Detail

      • GraphQLRequestExecutionException

        public GraphQLRequestExecutionException​(java.lang.String msg)
      • GraphQLRequestExecutionException

        public GraphQLRequestExecutionException​(java.lang.String msg,
                                                java.lang.Throwable cause)
      • GraphQLRequestExecutionException

        public GraphQLRequestExecutionException​(java.util.List<Error> errors)
        Generates a new instance, from a non empty and non null list of GraphQLError
        Parameters:
        errors - A list of GraphQL error messages
      • GraphQLRequestExecutionException

        public GraphQLRequestExecutionException​(java.lang.String msg,
                                                java.util.List<Error> errors)
    • Method Detail

      • 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.