Enum Class DruidException.Category

java.lang.Object
java.lang.Enum<DruidException.Category>
org.apache.druid.error.DruidException.Category
All Implemented Interfaces:
Serializable, Comparable<DruidException.Category>, Constable
Enclosing class:
DruidException

public static enum DruidException.Category extends Enum<DruidException.Category>
Category of error. The simplest way to describe this is that it exists as a classification of errors that enables us to identify the expected response code (e.g. HTTP status code) of a specific DruidException
  • Enum Constant Details

    • DEFENSIVE

      public static final DruidException.Category DEFENSIVE
      Means that the exception is being created defensively, because we want to validate something but expect that it should never actually be hit. Using this category is good to provide an indication to future reviewers and developers that the case being checked is not intended to actually be able to occur in the wild.
    • INVALID_INPUT

      public static final DruidException.Category INVALID_INPUT
      Means that the input provided was malformed in some way. Generally speaking, it is hoped that errors of this category have messages written either targeting the USER or ADMIN personas as those are the general users of the APIs who could generate invalid inputs.
    • UNAUTHORIZED

      public static final DruidException.Category UNAUTHORIZED
      Means that the error is a problem with authorization.
    • FORBIDDEN

      public static final DruidException.Category FORBIDDEN
      Means that an action that was attempted is forbidden
    • NOT_FOUND

      public static final DruidException.Category NOT_FOUND
      Means that the requested resource cannot be found.
    • CONFLICT

      public static final DruidException.Category CONFLICT
      Indicates that the request could not be completed due to a conflict with the current state of the target resource.
    • CAPACITY_EXCEEDED

      public static final DruidException.Category CAPACITY_EXCEEDED
      Means that some capacity limit was exceeded, this could be due to throttling or due to some system limit
    • CANCELED

      public static final DruidException.Category CANCELED
      Means that the query was canceled for some reason
    • RUNTIME_FAILURE

      public static final DruidException.Category RUNTIME_FAILURE
      Indicates a server-side failure of some sort at runtime
    • SERVICE_UNAVAILABLE

      public static final DruidException.Category SERVICE_UNAVAILABLE
      Indicates that the underlying service is unavailable to serve the request.
    • TIMEOUT

      public static final DruidException.Category TIMEOUT
      A timeout happened
    • UNSUPPORTED

      public static final DruidException.Category UNSUPPORTED
      Indicates some unsupported behavior was requested.
    • UNCATEGORIZED

      public static final DruidException.Category UNCATEGORIZED
      A catch-all for any time when we cannot come up with a meaningful categorization. This is hopefully only used when converting generic exceptions from frameworks and libraries that we do not control into DruidExceptions
  • Method Details

    • values

      public static DruidException.Category[] 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 DruidException.Category 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
    • getExpectedStatus

      public int getExpectedStatus()