Enum Class ErrorType

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

public enum ErrorType extends Enum<ErrorType> implements 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:
  • 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