Enum Class ErrorType

java.lang.Object
java.lang.Enum<ErrorType>
org.springframework.graphql.execution.ErrorType
All Implemented Interfaces:
graphql.ErrorClassification, Serializable, Comparable<ErrorType>, Constable

public enum ErrorType extends Enum<ErrorType> implements graphql.ErrorClassification
Common categories to use to classify for exceptions raised by DataFetcher's that can enable a client to make automated decisions.
Since:
1.0.0
Author:
Rossen Stoyanchev
See Also:
  • GraphqlErrorBuilder.errorType(ErrorClassification)
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    DataFetcher cannot or will not fetch the data value due to something that is perceived to be a client error.
    DataFetcher refuses to authorize the fetching of the data value.
    DataFetcher encountered an unexpected condition that prevented it from fetching the data value.
    DataFetcher did not find a data value or is not willing to disclose that one exists.
    DataFetcher did not fetch the data value due to a lack of valid authentication credentials.
  • Method Summary

    Modifier and Type
    Method
    Description
    static ErrorType
    Returns the enum constant of this class with the specified name.
    static ErrorType[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface graphql.ErrorClassification

    toSpecification
  • Enum Constant Details

    • BAD_REQUEST

      public static final ErrorType BAD_REQUEST
      DataFetcher cannot or will not fetch the data value due to something that is perceived to be a client error.
    • UNAUTHORIZED

      public static final ErrorType UNAUTHORIZED
      DataFetcher did not fetch the data value due to a lack of valid authentication credentials.
    • FORBIDDEN

      public static final ErrorType FORBIDDEN
      DataFetcher refuses to authorize the fetching of the data value.
    • NOT_FOUND

      public static final ErrorType NOT_FOUND
      DataFetcher did not find a data value or is not willing to disclose that one exists.
    • INTERNAL_ERROR

      public static final ErrorType INTERNAL_ERROR
      DataFetcher encountered an unexpected condition that prevented it from fetching the data value.
  • Method Details

    • values

      public static ErrorType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ErrorType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null