Package org.apache.druid.error
Enum DruidException.Category
- All Implemented Interfaces:
Serializable,Comparable<DruidException.Category>
- Enclosing class:
DruidException
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 Summary
Enum ConstantsEnum ConstantDescriptionMeans that the query was canceled for some reasonMeans that some capacity limit was exceeded, this could be due to throttling or due to some system limitIndicates that the request could not be completed due to a conflict with the current state of the target resource.Means that the exception is being created defensively, because we want to validate something but expect that it should never actually be hit.Means that an action that was attempted is forbiddenMeans that the input provided was malformed in some way.Means that the requested resource cannot be found.Indicates a server-side failure of some sort at runtimeIndicates that the underlying service is unavailable to serve the request.A timeout happenedMeans that the error is a problem with authorization.A catch-all for any time when we cannot come up with a meaningful categorization.Indicates some unsupported behavior was requested. -
Method Summary
Modifier and TypeMethodDescriptionintstatic DruidException.CategoryReturns the enum constant of this type with the specified name.static DruidException.Category[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
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
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
Means that the error is a problem with authorization. -
FORBIDDEN
Means that an action that was attempted is forbidden -
NOT_FOUND
Means that the requested resource cannot be found. -
CONFLICT
Indicates that the request could not be completed due to a conflict with the current state of the target resource. -
CAPACITY_EXCEEDED
Means that some capacity limit was exceeded, this could be due to throttling or due to some system limit -
CANCELED
Means that the query was canceled for some reason -
RUNTIME_FAILURE
Indicates a server-side failure of some sort at runtime -
SERVICE_UNAVAILABLE
Indicates that the underlying service is unavailable to serve the request. -
TIMEOUT
A timeout happened -
UNSUPPORTED
Indicates some unsupported behavior was requested. -
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
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
getExpectedStatus
public int getExpectedStatus()
-